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… do


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

Paul F.

To unsubscribe from this list, please visit:


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

assuming you’ve already assigned the controller

instance to instance variable ‘@controller do

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

but probably best to stick with JRuby threads.