From 28144433b2f951279552b39bc358769a5267e26a Mon Sep 17 00:00:00 2001 From: ko1 Date: Wed, 18 Jul 2012 05:46:40 +0000 Subject: * thread.c (rb_threadptr_async_errinfo_*): manage async errors queue. Async events such as an exception throwed by Thread#raise, Thread#kill and thread termination (after main thread termination) will be queued to th->async_errinfo_queue. - clear: clear the queue. - enque: enque err object into queue. - deque: deque err object from queue. - active_p: return 1 if the queue should be checked. rb_thread_t#thrown_errinfo was removed. * vm_core.h: add declarations of rb_threadptr_async_errinfo_*. remove rb_thread_t#thrown_errinfo field and add rb_thread_t#async_errinfo_queue (queue body: Array), rb_thread_t#async_errinfo_queue_checked (flag), rb_thread_t#async_errinfo_mask_stack(Array, not used yet). * vm.c (rb_thread_mark): fix a mark function. * cont.c (rb_fiber_start): enque an error. * process.c (after_fork): clear async errinfo queue. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36430 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'process.c') diff --git a/process.c b/process.c index 64c0568bde..90eaa0e2e7 100644 --- a/process.c +++ b/process.c @@ -1055,7 +1055,7 @@ after_exec(void) } #define before_fork() before_exec() -#define after_fork() (GET_THREAD()->thrown_errinfo = 0, after_exec()) +#define after_fork() (rb_threadptr_async_errinfo_clear(GET_THREAD()), after_exec()) #include "dln.h" -- cgit v1.2.3