Hi On Wed, Oct 24, 2012 at 9:11 PM, Brian Anderson <[email protected]>wrote:
> For reference, here is the server test case in net::tcp: > > https://github.com/mozilla/**rust/blob/incoming/src/libstd/** > net_tcp.rs#L1560<https://github.com/mozilla/rust/blob/incoming/src/libstd/net_tcp.rs#L1560> > > In the connect callback it looks like it spawns a new task and waits for > it to accept the connection. After the connection is accepted the child > task handles the connection and the original task continues to listen for > additional connections. Well, but shouldn't this case just work without spawning tasks? tcp::listen should be blocking on fd IO, right, but the moment something becomes available it actually unblocks, runs the callback on the same task/thread and then blocks again till the listen fd becomes available again. However, it seems like it is only doing it for the first connection that comes in, after that it just does nothing. Are my assumptions incorrect? Thanks Arkaitz
_______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
