in reply to Re: Re: Re: Re: thread:shared
in thread thread:shared

Merry Christmas to you too. :-) Thanks for the explanations. The only problem I'm still seeing in my testing is that zombie thread. What happens for me depends on my testing. I'm starting the server, then connect with 3 clients. If I disconnect the clients, in the creation order, 1..2..3, first kill 1, then 2 then 3, there is no zombie thread left. But if I kill them off 3..2..1, then there is the zombie thread, and the server will crash when I restart the clients and send a message. I tried to not detach the $r and $w, and this problem goes away, the threads dissapear from the socklist, but they are still leaking internally, and the tid count from threads->list starts to climb. And my current approach is to try to use your Elm to join threads when they are no longer active. It is departing from your method though. Anyways, thanks for posting this. I learned alot.