Project

General

Profile

Actions

Backport #2240

closed

returning from Monitor#synchronize causes 'ThreadError: killed thread' when no waiting thread is alive

Added by nahi (Hiroshi Nakamura) over 14 years ago. Updated almost 13 years ago.


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 #1

Updated by nahi (Hiroshi Nakamura) over 14 years ago

=begin
NOTE: 1.9 (ruby 1.9.2dev (2009-10-20 trunk 25411) [i686-linux]) is safe.
=end

Actions #2

Updated by nahi (Hiroshi Nakamura) over 14 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

=begin
This issue was solved with changeset r25420.
Hiroshi, thank you for your reporting of the issue.
You have greatfully contributed toward Ruby.
May Ruby be with you.

=end

Actions #3

Updated by nahi (Hiroshi Nakamura) over 14 years ago

=begin
Title must be '... when the scheduled thread is not alive' as you see the fix.
=end

Actions #4

Updated by shyouhei (Shyouhei Urabe) over 14 years ago

  • Status changed from Closed to Assigned
  • Assignee set to wyhaines (Kirk Haines)

=begin
1.8.6 also fails on this test case.
=end

Actions #5

Updated by wyhaines (Kirk Haines) almost 14 years ago

  • Status changed from Assigned to Closed

=begin
This issue was solved with changeset r28232.
Hiroshi, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.

=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0