There is no way to generically wake up or kill a task, it must be
arranged via some other means for the task to wake up. For TCP
connections, you can use the close_read() method or the
set_read_timeout() methods. In 0.10, this was not implemented (we
recommend you use master).

On Thu, May 15, 2014 at 3:43 PM, Paul Colomiets <[email protected]> wrote:
> Hi,
>
> I have a few kinds of tasks like the ones reading from a TCP socket or
> listening for TCP connections, that need to be shut down when
> unneeded. How can I wake up/kill a task waiting for data in
> Reader.read() method or similar?
>
> In the master branch I can set_timeout and wake up once a while (which
> seems like ugly hack too) In 0.10 there is no even timeouts. Is there
> any way to interrupt or kill a task?
>
> --
> Paul
> _______________________________________________
> Rust-dev mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/rust-dev
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to