Use Thread.pass until thread.stop? to wait for thread to block

[Bug #19415]

It should be more reliable
This commit is contained in:
Jean Boussier 2023-02-08 11:23:25 +01:00 committed by Jean Boussier
parent 63e1769b16
commit 3a0f6ce1d3
Notes: git 2023-02-08 10:53:18 +00:00

View File

@ -1,4 +1,4 @@
object = ScratchPad.recorded
thread = Thread.new { object.require(__FILE__) }
thread.wakeup unless thread.stop?
Thread.pass until thread.stop?
ScratchPad.record(thread)