dpc / mioco.pre-0.9

Scalable, coroutine-based, asynchronous IO handling library for Rust programming language. (aka MIO COroutines).
Mozilla Public License 2.0
457 stars 30 forks source link

handle panic/failure in resume() #9

Closed jeremyjh closed 9 years ago

jeremyjh commented 9 years ago

The most likely cause for failure in handle.resume() is a panic in the co-routine it was running. We can handle this condition and other failure reasons by setting the state to Finished, cleaning up and writing an error message, preventing panic of the entire event loop.

dpc commented 9 years ago

Nice. I wonder, maybe we should start writing tests for things.