1. I/O functions in Phobos are not Fiber-aware, so we will have

to have our own set of I/O operations, is that correct?

It would be possible to use at least non-blockig sockets in the same way, but in general, most of Phobos is indeed not suitable for asynchronous I/O. But that's less a problem of fibers, as most of the code does not really have to be aware if it runs inside of a fiber or not (there is not really a difference since each function can usually only access it's own stack frame an globals, so it doesn't matter if the stack frame is on a fiber stack or not). The main problem is that phobos does not provide an interface to the asynchronous OS APIs (epoll, overlapped I/O etc.).

  1. How exactly does it resume the fiber after yield()?

Most of the time, the underlying asynchronous call takes a callback and a user defined pointer. Basically that pointer is used to tell which fiber has to be resumed. You can look for resumeTask() and yieldForEvent() in on of the drivers in vibe.core.drivers, that part is actually quite simple. Exceptions have to be passed from the callback to the inside of the fiber in a special way, but that's about it already.

Sönke