From: KOSAKI Motohiro Date: 2011-12-27T20:32:57+09:00 Subject: [ruby-core:41827] Re: [ruby-trunk - Feature #5788] Thread#at_exit 2011/12/27 Eric Wong : > Motohiro KOSAKI wrote: >> I don't think ruby impl w/o GVL can implement this feature. > > pthread_key_create() can be used to register a destructor function. > I don't know about other thread APIs, though. No. The proposal API can replace with another thread's exiting hook. It's racy be definition. pthread_key_create() can't help. Moreover, the proposal syntax may accelerate careless racy code. That's bad. We sould only encourage good custom.