99zzuw
Last Updated: February 25, 2016
·
1.833K
· davetron5000
F74253f4a099258870157426b4cdb2dc

Threads in Ruby? Use JRuby

Threads are an easy way to run background processes or do things concurrently, but the management of threads and shared state can be difficult.

Use JRuby and the java.util.concurrent package. The javadoc is amazing:

http://docs.oracle.com/javase/6/docs/api/java/util/concurrent/package-summary.html

And with JRuby, you can write idiomatic Ruby code that uses all the power provided by the JVM for managing threads and dealing with shared state.

Say Thanks
Respond