Ian Kelly <ian.g.ke...@gmail.com>:

> Callbacks can easily schedule coroutines, but they can't wait on them,
> because that would require suspending their execution, dropping back
> to the event loop, and resuming later -- in other words, the callback
> would need to be a coroutine also.

I guess the key is, can a callback release a lock or semaphore, notify a
condition variable, or put an item into a queue that a coroutine is
waiting on?

Quite possibly. Didn't try it. In that case, callbacks mix just fine
with coroutines.


Marko
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to