Changeset 3623

Show
Ignore:
Timestamp:
16/10/08 21:06:49 (3 months ago)
Author:
tack
Message:

Clarify comment and output when calling coroutines in threads.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/base/src/notifier/thread.py

    r3585 r3623  
    363363            if type(result) == types.GeneratorType or isinstance(result, InProgress): 
    364364                # Looks like the callback is yielding something, or callback is a 
    365                 # coroutine-decorated function.  Not supported (yet?). 
    366                 log.warning('NYI: threads cannot yet be coroutines.') 
     365                # coroutine-decorated function.  Not supported (yet?).  In the 
     366                # case of coroutines, the first entry will execute in the 
     367                # thread, but subsequent entries (via the generator's next()) 
     368                # will be from the mainthread, which is almost certainly _not_ 
     369                # what is intended by threading a coroutine. 
     370                log.warning('NYI: coroutines cannot (yet) be executed in threads.') 
    367371            MainThreadCallback(self.finish)(result) 
    368372        self._callback = None