문제

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?

도움이 되었습니까?

해결책

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."

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top