Question

I've built my application using MRI without taking into consideration threads or concurrency, and so the application is most definitely not threadsafe (many of dependencies certainly not). My question is could I still port this to JRuby and use Puma without using config.threadsafe! and still see improvements?

Was it helpful?

Solution

Yes you can "The JRuby runtime itself is considered to be threadsafe. From Java, you can use a single runtime safely across threads, provided the code in those threads does not do thread-unsafe. Thread-safety does not mean your code will always run correctly; you will still often need to ensure threads don't step on each others' modifications."

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top