Live data from Hacker News

Ruby 1.9.3 released

blade.nagaokaut.ac.jp

41–45 of 45 posts

Re: Ruby 1.9.3 released

#42
post #36

Earlier quoted context omitted.

The lack of a working ruby-debug19 has been the only thing keeping me from using 1.9.3.

Just use pry, it's not really a debugger replacement, but it's useful in most cases that ruby-debug19 would be used. http://rubygems.org/gems/pry

I've used pry. I like pry, but it really does not fill the need of a debugger.

Re: Ruby 1.9.3 released

#44
post #28

Earlier quoted context omitted.

1.8 had green threads and when the interpreter blocked on some operations it would block all the threads. 1.9 uses native threads but it has a global interpreter lock which has known issues. I am not sure what the improvements to locking in 1.9.3, as the changelog has quite a few commits related to that.

In both Ruby 1.8 and 1.9, Ruby code will not cause all threads to block when the CPU is idle. However, poorly coded C libraries that blocked on IO without providing Ruby a file descriptor (via rb_thread_select) could cause all threads to block. Those libraries have largely been fixed or replaced (e.g. mysql with mysql2). Ruby 1.9.2 also provides a mechanism for C code to release the GIL if it does not involve any Rub…

rb_thread_select is marked deprecated in 1.9.3... so what's the alternative?

Re: Ruby 1.9.3 released

#45
post #44
post #28

Earlier quoted context omitted.

In both Ruby 1.8 and 1.9, Ruby code will not cause all threads to block when the CPU is idle. However, poorly coded C libraries that blocked on IO without providing Ruby a file descriptor (via rb_thread_select) could cause all threads to block. Those libraries have largely been fixed or replaced (e.g. mysql with mysql2). Ruby 1.9.2 also provides a mechanism for C code to release the GIL if it does not involve any Rub…

rb_thread_select is marked deprecated in 1.9.3... so what's the alternative?

ok... replying to myself here... I think if you're using rb_thread_select the answer may be... use select(2) in an rb_thread_blocking_region callback... still not convinced this is better...
Post reply on HN