On Wed, Nov 18, 2009 at 3:13 PM, Christian Jaeger chrjae@gmail.com wrote:
The problem with this code is that threads may exit after I have put them into my list but before I call join on them.
I don't see why that would be a problem, thread-join! will work as well on exited threads.
Good to know. I didn't know if the behavior was defined.
However I guess you'll have to call tcp-service-unregister! before getting the list of threads or there can new threads be created before you're done joining those from the list.
You could also keep looping as long as threads exist (excluding the primordial one of course).
Interestingly, it looks like the thread created by TCP-SERVICE-REGISTER! isn't included in the the thread group linked to the originating thread (I'm assuming this because it's not in the returned list of threads from the code in my original email). I forget the semantics of thread groups. Maybe I should figure out how to get a list of all threads disregarding groups.
Thanks, James