Is Thread # safe in MRI Ruby 1.9 / 2.0?

So, there is an old blog post about the insecurity of Thread # raise, Thread # kill and the Timeout extension ( http://headius.blogspot.com/2008/02/rubys-threadraise-threadkill-timeoutrb.html ). Java has long abandoned its equivalent methods for the same reasons ( http://docs.oracle.com/javase/1.4.2/docs/guide/misc/threadPrimitiveDeprecation.html ).

The blog post is very old. Are modern Thread.raise implementations safe? If yes, is there any documentation / fixation to prove / demonstrate this?

+4
source share
1 answer

, ( , ). https://github.com/ruby/ruby/blob/trunk/lib/timeout.rb - , , x.raise exception. , , , [yikes]. FWIW.

+3

All Articles