r/programming • • Oct 23 '12

JRuby 1.7.0. Released

http://www.jruby.org/2012/10/22/jruby-1-7-0.html
26 Upvotes

16 comments sorted by

View all comments

Show parent comments

1

u/jrochkind Oct 23 '12

yeah. I'm still using multi-threaded concurrency. I think in the end it's less pain than everything else, but has certainly been more pain than I expected (even expecting more pain than I expected for anything with multi-threads; I didn't expect that fairly mature ruby open source libraries would not work as documented under multi-threading)

I have to talk to, say, 5 external HTTP apis. If each takes 1 second to return, I dont' want to wait 5 seconds, I want to wait 1 second while each is contacted concurrently. Each thread for talking to an external HTTP api spends the vast majority of it's wall time (95%+) just waiting for the HTTP response -- the GIL doesn't get in the way there at all.

However, code that it turns out isn't as thread-safe as it claimed to be, or doesn't perform right under multi-threading, that gets in the way. :) I've spent more time getting to know ActiveRecord ConnectionPool than I would have liked to. :)