Actions
Bug #19407
open2 threads taking from current ractor will hang forever
Description
In the current implementation of Ractors, it's possible to take
from the current ractor. This could be useful
when co-ordinating threads:
t = Thread.new do
obj = Ractor.current.take
p obj # do some work with obj
end
t0 = Thread.new do
obj = Ractor.current.take
p obj # do some work with obj
end
Ractor.yield :go
However it hangs forever:
t = Thread.new do
obj = Ractor.current.take
p obj
end
t0 = Thread.new do
obj = Ractor.current.take
p obj
end
sleep 0.5
Should "self-take" be disabled, or was it designed to allow it but this is just a bug?
Actions
Like0
Like0