Re: [Jruby-devel] Thread#kill

2006-04-26 Thread Charles O Nutter
On 4/26/06, Evan Buswell <[EMAIL PROTECTED]> wrote: > Since YARV (and therefore Ruby 2.0) seems to be planning switching from > Green Threads to Native Threads (or at least that's what I get from > looking through the cryptic notes at > http://glu.ttono.us/articles/2005/10/14/yarv-progress-report)

Re: [Jruby-devel] Thread#kill

2006-04-26 Thread Evan Buswell
Since YARV (and therefore Ruby 2.0) seems to be planning switching from Green Threads to Native Threads (or at least that's what I get from looking through the cryptic notes at http://glu.ttono.us/articles/2005/10/14/yarv-progress-report) do we even *want* to implement green threads? If we are com

Re: [Jruby-devel] Thread#kill

2006-04-18 Thread Charles O Nutter
The granularity of thread events is still up for debate. Every newline makes some sense, but it may not be granular enough. I'm not sure what Ruby does, but I did not make any major modification to the threading granularity when I rewired it. I'll have a look at your patch. Getting things basically

Re: [Jruby-devel] Thread#kill

2006-04-18 Thread Evan
This seems to fix it. Patch is against latest *anonymous* cvs, which I understand is out of date. The changes are: 1) make ThreadKill a derived class of JumpException 2) make a handler for ThreadKill similar to that for RaiseException, except without any rescuing code. 3) add a flag to RubyThr

Re: [Jruby-devel] Thread#kill

2006-04-12 Thread Charles O Nutter
Perhaps it's similar to Thread.raise, but without raising anything. Should be an easy fix.On 4/12/06, Nawrocke Kelly < [EMAIL PROTECTED]> wrote:I ran some test cases in C Ruby and yes they are executed.  so kill doesn't mean kill, its more of a polite "please stop at your earliestconvenience and do

Re: [Jruby-devel] Thread#kill

2006-04-12 Thread Nawrocke Kelly
I ran some test cases in C Ruby and yes they are executed. so kill doesn't mean kill, its more of a polite "please stop at your earliest convenience and don't do anything silly in your ensure blocks". kelly On Apr 12, 2006, at 7:36 PM, Charles O Nutter wrote: My friend, you have stumbled o

Re: [Jruby-devel] Thread#kill

2006-04-12 Thread Charles O Nutter
My friend, you have stumbled onto the dark underbelly of Ruby and JRuby: Threads.About a year ago, I rewrote the threading subsystem so that more of the common thread semantics would function correctly. That required a number of tricks and locking mechanisms for stop, wait, critical, etc to actuall

Re: [Jruby-devel] Thread#kill

2006-04-11 Thread Evan
OK, so here's my thoughts so far: EvaluationState.begin handles rescue and ensure blocks, by catching JumpExceptions. It is trivial to add something here that catches the ThreadKill exception, or possibly it should be changed to itself be a JumpException (probably the latter). The problem is, th