Project

General

Profile

Actions

Bug #7459

closed

at_exit { Thread.new {} } broken in r37921

Added by zenspider (Ryan Davis) about 12 years ago. Updated about 12 years ago.

Status:
Closed
Assignee:
-
Target version:
ruby -v:
2.0
Backport:
[ruby-core:50276]

Description

ruby -e 'p Thread.current; at_exit { p Thread.current; [Thread.new {}].map(&:join) }'

outputs:

#<Thread:0x007feeb28b0fa8 run>
#<Thread:0x007feeb28b0fa8 dead>
-e:1:in new': can't alloc thread (ThreadError) from -e:1:in block in '

Either the main thread shouldn't be marked as dead until it actually is, or the check in thread_s_new should be expanded to include whatever thread is responsible for the at_exit run.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0