Forum: JRuby Grizzly execute Thread start

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Paul F. (Guest)
on 2009-04-09 19:05
(Received via mailing list)
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:
Bill D. (Guest)
on 2009-04-11 01:03
(Received via mailing list)
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.

This topic is locked and can not be replied to.