From: "Iñaki Baz Castillo" Date: 2012-04-24T20:33:20+09:00 Subject: Re: GVL lock and unlock 2012/4/24 Iñaki Baz Castillo : > Ok, so in summary: > > - I must release the GVL *before* running the uv loop (which is a > blocking function that just returns when there are no listeners in the > loop). If not, other Ruby threads cannot work (already verified). So I must use rb_thread_call_without_gvl(). > - And I must take again the GVL when a uv callback occurs (i.e. a > timer) and I must execute some associated Ruby code (i.e. a > block.call), and then I must release again the GVL after such a Ruby > code terminates so uv takes again the control and the GVL is released > for other Ruby threads to work. So I must use rb_thread_call_with_gvl(). -- Iñaki Baz Castillo