Pleas tell me, why doesn't the following work? The code within
_processData() does not yield anything to add data to my
cogen.core.queue.Queue object. And there are no error messages
whatsoever.
Interestingly, I can return that messageQueue back to
processMessage(), and then yield from there. That seems to work as
expected.
I don't understand why I can't put a yield inside a helper function.
It will help clean up my code.
def _processData(self, element):
messageQueue = someDict['somekey']
yield messageQueue.put(message)
@coro
def processMessage(self, **kwargs):
pubsub = kwargs['pubsub']
yield pubsub.subscribe()
while 1:
result = (yield pubsub.fetch())
for element in result:
self._processData(element)
Thanks !
--
You received this message because you are subscribed to the Google Groups "cogen" group.
To post to this group, send email to
co...@googlegroups.com.
To unsubscribe from this group, send email to
cogen+un...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/cogen?hl=en.