Use penlight's class library.
Add read/write.
Correct dead coroutine handling.

Coroutine for a ready fd may have died before the fd event is handled.