Am 11.12.2013 12:19, schrieb Shammah Chancellor:

On 2013-12-06 21:34:17 +0000, Etienne Cimon said:

If you need to run routines that take a lot of CPU cycles, you can
call yield() every now and then to make sure other requests aren't
left out while this operation runs.

As an aside, I was having trouble with my fiber's not being woken back
up. What exactly causes them to wake back up?

-Shammah

In the case of yield(), what happens is that the event loop is invoked
once to process any pending events, followed by restarting any
fibers/task in the same order in which they called yield.

For implicit yielding based on I/O, timers or other events, only the
matching event wakes up the task. So if a specific task isn't woken up
it usually simply indicates that an expected event hasn't yet fired -
or, of course, a bug ;)

One reason why things may stall is when the thread is continually
blocked by non-asynchronous blocking operations. Another common reason
might be that a task is waiting in vibe.core.concurrency.receive or in
TaskMutex.lock, but the task which is supposed to send a message or
give up the mutex was terminated by an exception.