Thanks.

This hack works O_O. But why? What's the problem with this constants?
From code it seems to me that Ruby thread slice is 250 milliseconds.
Is it correct? If so, why so ridiculously big value - normal slice
size for Windows/OSX/nix is around 10-20 milliseconds.

Also, i have found that on OSX this can be fixed without source code patch:
Thread.new { loop { a = 1 } }.priority = -10

Unfortunately, all this (both patch and my cheat based on it) don't
work on Windows :(. And on Windows lags are much more terrible.

Any ideas why this workaround is not working on Windows?

On Mon, Feb 27, 2012 at 7:58 PM, U.Nakamura <usa / garbagecollect.jp> wrote:
> Hello,
>
> In message "[ruby-core:42974] Re: 50$ for answering my stackoverflow question about Ruby GIL 500 reputation stackoverflow question about Ruby GIL 50$ for answering my stackoverflow question."
>    on Feb.28,2012 00:51:10, <usa / garbagecollect.jp> wrote:
>> But I don't recommend to use it because this is only a workaround,
>> so you don't have to pay for me :)
>
> Oops, I've forgotten an advice for you.
> You should not write busy loop even if your code is mutlithread
> program.
>
>  ex) Thread.new{ loop { a = 1 } } #=> Thread.new{ loop { a = 1; Thread.pass } }
>
> It's better custom, I think.
>
>
> Regards,
> --
> U.Nakamura <usa / garbagecollect.jp>
>
>