Hello, l...@gnu.org (Ludovic Courtès) writes:
> l...@gnu.org (Ludovic Courtès) writes: >> Andy Wingo <wi...@pobox.com> writes: >> >>> No, the issue is elsewhere, that the thread-exit handlers were not being >>> called >> >> I just tried with 60582b7c2a495957012f9a20cd8691dc6307a850 and >> ‘on_thread_exit’ /is/ called after something like >> ‘(call-with-new-thread (lambda () #t))’. > > The thread-exit handlers were not being called *for threads launched by > scm_spawn_thread*. > > The patch below (against 60582b7c2a495957012f9a20cd8691dc6307a850) fixes it. After reviewing f60a7648d5926555c7760364a6fbb7dc0cf60720 (which addressed the same issue), I lean towards reverting it and instead applying the patch I just sent. The problem I see with f60a7648d5926555c7760364a6fbb7dc0cf60720 is that it re-introduces a pthread_key, even when using TLS, and make things a bit complex IMO. Thoughts? Besides, reverting it may fix --without-threads builds. Thanks, Ludo’.