In my Ruby C extension I use rb_barrier_wait(MY_BARRIER) in a method. It works perfectly but I've realized of a case in which it gets blocked: Thread.new do MyExten.my_method end In this case the C function rb_barrier_wait(MY_...ibc (Iñaki Baz Castillo)
Thanks, that's more or less the workaround I've applied in my code: if rb_protect() detects an error and rb_errinfo() returns a Fixnum, then I don't raise it, but instead set the error to Interrupt and then raise it.ibc (Iñaki Baz Castillo)
BTW, is Ruby-head (ruby 2.0.0dev (2012-06-13 trunk 36062) [x86_64-linux]) stable enough? Running my C extension (which uses blocking region for running a libuv loop) with 1.9.3-p0 works perfectly, but using 2.0.0dev I get assertion er...ibc (Iñaki Baz Castillo)
Hi, I've installed rvm and ruby-head, which is retrieved from https://github.com/ruby/ruby/. Unfortunately the patch you mean, which is this: https://github.com/ruby/ruby/commit/38d3b013b7733d9ccd66c011d74c00b35bb704c4 was reverted...ibc (Iñaki Baz Castillo)
drbrain (Eric Hodel) wrote: > =begin > ... Running this code in 1.9.3p0 I don't get a crash, but a simple "stack level too deep (SystemStackError)". ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]ibc (Iñaki Baz Castillo)
Using rb_protect() I've realized that when the thread is killed by other thread using Thread#kill, the error_tag passed to rb_protect() is set to 8 and rb_errinfo() returns Fixnum 8: ret = rb_protect(function, data, &error_tag); ...ibc (Iñaki Baz Castillo)
Well, I have a C extension (a reactor based on libuv) in which I would like to perform the "loop release" within a single C function (to avoid some steps of the function to be interrupted by an exception or whatever). In such a "release"...ibc (Iñaki Baz Castillo)