Re: [GD-Linux] Cancelling blocking recv calls on Linux
Brought to you by:
vexxed72
From: Ryan C. G. <ic...@cl...> - 2002-05-10 13:44:58
|
> Anybody got anything better or is this infact the correct way to use > blocking sockets with threads? Have you tried sending a signal to the blocked thread? When you do, recv() should return -1 and set errno to EINTR. From there the thread can check a global variable or something that symbolizes that the system is shutting down, and exit cleanly if it's set. --ryan. |