On 8/16/06, Charles O Nutter <headius / headius.com> 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......)