From: Francis Cianfrocca Date: 2006-08-17T03:04:19+09:00 Subject: Re: sandbox timers & block scopes On 8/16/06, Charles O Nutter wrote: > > This is basically the same, yes...but I think we're both on the right track. > There are already hooks in the interpreter "loop" to check whether a thread > context switch has been requested, and the sandbox is really just a special > case of green threads. Overloading that feature to monitor sandbox > runtime--especially if per-sandbox threading is disabled for such > scenarios--should be very easy to do (and it works across platforms, of > course, since the threading-signaling code is already there). > Shouldn't take much to validate this approach- just dig into the interpreter and see if it's possible to "synthetically" raise a Ruby exception to some specific thread (which may be the currently running one). (Hmm, I'm kinda busy this afternoon......)