Timeout with persistent connections
Marc Lehmann
schmorp at schmorp.de
Sat Aug 6 12:51:16 CEST 2011
On Sat, Aug 06, 2011 at 10:23:17AM +1000, Kevin Ryde <user42 at zip.com.au> wrote:
> > without telling the event loop (which still thinks it is 6 seconds past
> > when new timeouts are created). Since 6 seconds is long enough for a
> > timeout to occur, one does occur immediately.
>
> If after a lag there's both timeout and incoming data ready, does it
> prefer to read the data (which would reset or discard the timer)?
Depends on the event loop - EV for example prefers the timeout (as does
AnyEvent's pure perl loop). As a result, it's unspecified in AnyEvent.
--
The choice of a Deliantra, the free code+content MORPG
-----==- _GNU_ http://www.deliantra.net
----==-- _ generation
---==---(_)__ __ ____ __ Marc Lehmann
--==---/ / _ \/ // /\ \/ / schmorp at schmorp.de
-=====/_/_//_/\_,_/ /_/\_\
More information about the anyevent
mailing list