Re: [rust-dev] TCP Socket Non-blocking IO

2013-03-21 Thread Jack Moffitt
> In principle the right pattern for this might be two tasks with the same > socket? I don't know if rust's socket abstraction would like that or not. I thought some more about this and I think some kind of non-blocking read will be necessary. The Erlang way I mentioned must do this in the library

Re: [rust-dev] TCP Socket Non-blocking IO

2013-03-21 Thread gwil...@gmail.com
In principle the right pattern for this might be two tasks with the same socket? I don't know if rust's socket abstraction would like that or not. paul santa clara wrote: >Hey Jack, >Thanks for your response! I actually have a rust task managing the tcp >socket. Most of the time, this task is

Re: [rust-dev] TCP Socket Non-blocking IO

2013-03-19 Thread Jack Moffitt
> What I am really shooting for a is method to query a socket to > see if there is any data available for reading and if not, go do something > else for awhile. Rust has tasks so you can just spawn a task to handle the socket reads and do other stuff while it's blocking in other tasks. The non-blo

[rust-dev] TCP Socket Non-blocking IO

2013-03-19 Thread paul santa clara
Howdy, Sorry if this question is in appropriate for this forum, but I'm pretty stumped and was hoping someone could point me in the right direction. Essentially, I'm trying to figure how to go about performing a non-blocking read from TCP Socket. I see that there is a future_read fn implemen