Subj : Re: pthreads: cancelling thread blocked on berkeley socket accept() To : comp.programming.threads From : Marcin 'Qrczak' Kowalczyk Date : Mon Sep 19 2005 07:32 pm David Hopwood writes: > You should set a shared 'shouldExit' flag and close() the socket > from the main thread. The listening thread will get an error from > the accept(), and can then exit when it sees that 'shouldExit' is > set. I suppose there must be additional memory synchronization because accept + close don't synchronize memory, right? -- __("< Marcin Kowalczyk \__/ qrczak@knm.org.pl ^^ http://qrnik.knm.org.pl/~qrczak/ .