From: "Iñaki Baz Castillo" Date: 2012-05-16T00:36:35+09:00 Subject: How to ensure that a block runs entirely after other threads? (Thread.exclusive does not "work") Hi, I expected that in the following example code, thread t1 would not work until the Thread.exclusive blocks ends, but I am wrong: -------------------------------------- t1 = Thread.new { loop do printf "." ; sleep 0.1 end } Thread.exclusive do puts "entering Thread.exclusive..." sleep 2 puts "exiting Thread.exclusive" end t1.join -------------------------------------- But thread t1 runs every 0.1 seconds so I've don't properly understood the doc about Thread.exclusive. So, is there any easy way for telling Ruby "run this block entirely without passing the GVL to other thread in the middle of the block"? Thanks a lot. -- Iñaki Baz Castillo