Afficher un message
Vieux 13/04/2006, 21h52   #6
Mike - EMAIL IGNORED
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: tcp socket placement in threads

On Sat, 08 Apr 2006 23:04:23 +0100, Steve Horsley wrote:

> Mike - EMAIL IGNORED wrote:

[...]
>>
>>

> If your select thread doesn't actually do the recv(), but just
> queues a signal to another thread, then when it goes and
> select()s again, there's a good chance it will see the socket is
> STILL ready to read, and therefore queue another signal. You
> could send up sending a whole stream of signals when just one
> packet arrives. I don't like that idea.


The select thread doesn't look at a socket that just
read until the read thread "signals" that it has read,
so this is not a decisive argument.

>
> So I think you should do the recv() in the selecting thread, and
> queue the data instead of just a signal.
>
> Steve


  Réponse avec citation
 
Page generated in 0,07835 seconds with 9 queries