Grizzly execute Thread start

This code in a Grizzly execute method
new Thread(controller).start();
starts the thread running and terminates the thread when the controller
is stopped later on in the code. (I think)
In JRuby, something like…
Thread.new do

end

Presumably at the end of the block the thread would terminate, not what
we want.
How is this handled in JRuby?

Thanks
Paul F.


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

The only real difference is that the JRuby Thread won’t automatically
start
your Runnable controller, so you’ll have to do it manually:

assuming you’ve already assigned the controller

instance to instance variable ‘@controller

Thread.new do
@controller.run
end

You could also just use a raw Java thread, e.g.

java.lang.Thread.new(@controller).start

but probably best to stick with JRuby threads.

-Bill