true } Thread.pass until f f = false Thread.new { ....; f = true } Thread.pass until f •1.9.2でハングする(かもしれ ない)スクリプト例 •特にLinux •従来の実装は最近のCPUと相性 がよくなかった •1.9.2でハングする(かもしれ ない)スクリプト例 •特にLinux •従来の実装は最近のCPUと相性 がよくなかった
http://pubs.opengroup.org/onlinepubs/009695399/functions/sc hed_yield.html int sched_yield(void); • The sched_yield() function shall force the running thread to relinquish the processor until it again becomes the head of its thread list.