From: "ibc (Iñaki Baz Castillo)" Date: 2012-07-06T17:53:50+09:00 Subject: [ruby-core:46227] [ruby-trunk - Bug #6699] rb_barrier_wait() gets blocked when running within a Thread.new { } Issue #6699 has been updated by ibc (I��aki Baz Castillo). Thanks for the clarification. ---------------------------------------- Bug #6699: rb_barrier_wait() gets blocked when running within a Thread.new { } https://bugs.ruby-lang.org/issues/6699#change-27855 Author: ibc (I��aki Baz Castillo) Status: Open Priority: Normal Assignee: Category: ext Target version: 2.0.0 ruby -v: ruby 2.0.0dev (2012-07-03 trunk 36272) [x86_64-linux] 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_BARRIER) gets blocked (note that I don't call if from other place). So this seems a conflict of the new Thread and rb_barrier_wait(), it seems that they both try to access to the same shared resource. Is it the expected behavior? -- http://bugs.ruby-lang.org/