On Fri, 2009-04-03 at 18:02 +0200, Dirk Meyer wrote: > coroutine is a signal (note: a coroutine is a signal and a signal can be > handled as a coroutine. it works both ways).
Just to clarify: dischi meant that a signal can be represented by an InProgress object (not a coroutine), and this coercion happens via kaa.inprogress(): @kaa.coroutine() def foo(): [...] yield kaa.inprogress(some_signal) # Execution resumes when some_signal is emitted [...] I think dischi's language expresses more of an equivalence between coroutines and InProgress, but I like to think of an InProgress as representing or encapsulating an ongoing task, which is often either a thread or a coroutine. (Internally these are either ThreadInProgress or CoroutineInProgress objects, but we don't usually need to make any distinction in practice: they are both InProgress.) > async = kaa.webmetadata.themoviedb.search('something') > async.connect(callback) > async.exception.connect(exception_handler) Or more conveniently: async.connect_both(callback, exception_handler) ------------------------------------------------------------------------------ _______________________________________________ Freevo-devel mailing list Freevo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-devel