On Mon, 23 Dec 2013 23:25:58 +0100 Tobias Oberstein <[email protected]> wrote: > >> In short: I can't call a coroutine from data_received, but I can call an > >> inlineCallbacks-decorated functions in dataReceived. This is a major > >> difference. > > > > I'm willing to bet that you're doing something wrong here. Can you post > > code snippets? > > http://stackoverflow.com/questions/20746619/calling-coroutines-in-asyncio-protocol-data-received
I think you should instead write your coroutine as a separate function or method and then schedule it from data_received() using e.g. asyncio.async(). Perhaps it would be more convenient to be able to write data_received() as a coroutine; that's a possible enhancement. Regards Antoine.
