Motohiro KOSAKI <kosaki.motohiro / gmail.com> 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.