Goroutine, coroutine, or the similar in Rust


Hi All,

I have some interest in Rust, and i want to build something to learn it.

What i want to create is a TCP/UDP server.
I can do this easily using goroutine in Go or coroutine in gevent (Python).

My questions:

  1. Is there any similar features in Rust? I googled it for a while, but do not found anything interesting.
    I found this http://doc.rust-lang.org/0.11.0/green/coroutine/struct.Coroutine.html,
    but it has very small info.
  2. Any better way in Rust?
    I have experience in event driven programming in C using libev and epoll.
    And i really didn’t like it.




At the moment there are no libraries that I’m aware of for creating coroutines or green threads in Rust, though such a thing would be very welcome. For doing high performance I/O mio is probably your best bet, but it uses the event loop model that you don’t prefer and it doesn’t yet work on Windows.