|Subject:||Re: [lwip-users] sys_arch_mbox_fetch|
|Date:||Fri, 16 Oct 2009 13:45:59 +0200|
|User-agent:||Thunderbird 188.8.131.52 (Macintosh/20090812)|
Fabian Koch wrote:
I'd be glad if you could give me any ideas on how to achieve this behaviour in another way (and not setting recv_timeo and polling accept!)In such situations, I guess you'd normally use select to not let the accept task block in accept. You can then either have select use a timeout and check a flag (but that might be polling accept as you wrote) or use a (loopback) socket that is only used to send a shutdown flag:
The accept thread then waits on the accept-socket and the loopback-socket, it will get woken up when you send the shutdown flag to the loopback-socket.
|[Prev in Thread]||Current Thread||[Next in Thread]|