This project is closed and read-only.
Actions
Backport #2240
closedreturning from Monitor#synchronize causes 'ThreadError: killed thread' when no waiting thread is alive
Backport #2240:
returning from Monitor#synchronize causes 'ThreadError: killed thread' when no waiting thread is alive
Status:
Closed
Assignee:
Description
=begin
def test_killed_thread_in_synchronize
ary = []
queue = Queue.new
t1 = Thread.start {
queue.pop
@monitor.synchronize {
ary << :t1
}
}
t2 = Thread.start {
queue.pop
@monitor.synchronize {
ary << :t2
}
}
@monitor.synchronize do
queue.enq(nil)
queue.enq(nil)
assert_equal([], ary)
t1.kill
t2.kill
ary << :main
end
assert_equal([:main], ary)
end
=end
Actions