-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can I use spoon to execute a ruby block like fork does? #15
Comments
There's no way to spawn a subprocess using a block of code under JRuby, even with the spoon gem. However, it should be simple to replace this code with a thread that runs the logic and then terminates itself. You'd get the same concurrency without spawning. |
thanks for the quick reply! the workers need to run as separate processes, so I think I will follow the pattern laid out by foreman by using a runner as laid out here - ddollar/foreman#140 |
Looking down another path, I found your gist https://gist.github.com/headius/1378616 But it doesn't work in 1.7.4, expected? |
got further by using java.util.concurrent.ThreadPoolExecutor as you suggested, but now looks like I hit a wall with this JRuby bug - http://jira.codehaus.org/browse/JRUBY-7188 giving up and going back to MRI for now :( |
I am looking to update some code that uses fork so it's compatible with JRuby. The code runs a fork with a block of code, how do I accomplish the same functionality with spoon? I think I have to kick off another jruby instance, but how do I have it hone in on running a particular block?
This is from the aws simple workflow sdk btw.
The text was updated successfully, but these errors were encountered: