[macruby-changes] [3046] MacRuby/trunk/gcd.c

source_changes at macosforge.org source_changes at macosforge.org
Tue Nov 24 19:59:44 PST 2009


Revision: 3046
          http://trac.macosforge.org/projects/ruby/changeset/3046
Author:   lsansonetti at apple.com
Date:     2009-11-24 19:59:41 -0800 (Tue, 24 Nov 2009)
Log Message:
-----------
ignore exceptions raised inside GCD blocks (we will appropriately forward them to the main thread later)

Modified Paths:
--------------
    MacRuby/trunk/gcd.c

Modified: MacRuby/trunk/gcd.c
===================================================================
--- MacRuby/trunk/gcd.c	2009-11-25 03:28:45 UTC (rev 3045)
+++ MacRuby/trunk/gcd.c	2009-11-25 03:59:41 UTC (rev 3046)
@@ -283,12 +283,19 @@
     }
 }
 
-static void
+ VALUE
+rb_queue_dispatch_body(VALUE val)
+{
+    rb_vm_block_t *the_block = (rb_vm_block_t *)val;
+    return rb_vm_block_eval(the_block, 0, NULL);
+}
+
+ void
 rb_queue_dispatcher(void* block)
 {
     assert(block != NULL);
-    rb_vm_block_t *the_block = (rb_vm_block_t*)block;
-    rb_vm_block_eval(the_block, 0, NULL);
+    rb_rescue2(rb_queue_dispatch_body, (VALUE)block, NULL, 0,
+	    rb_eStandardError);
 }
 
 /* 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20091124/f66f4a8d/attachment.html>


More information about the macruby-changes mailing list