vxgmichel / aiostream

Generator-based operators for asynchronous iteration
http://aiostream.readthedocs.io
GNU General Public License v3.0
801 stars 34 forks source link

Coroutine function detection procudes false negatives #53

Open vxgmichel opened 4 years ago

vxgmichel commented 4 years ago

Here are the list of the combinators using asyncio.iscoroutinefunction to automatically detect whether the provided callback should be awaited or not:

The problem with this detection is that it is hard to avoid false negatives.

However there are two counter-arguments to that:

I can see a few solutions here:

Are there other alternative?