Message259045
StopIteration has a special meaning. Don't use set_exception() with it.
You probably need a more roundabout way to do this.
Instead of submitting each __next__() call to the executor separately, you should submit something to the executor that pulls the items from the iterator and sticks them into a queue; then on the asyncio side you pull them out of the queue.
You can use an asyncio.Queue as the queue, and use loop.call_soon_threadsafe() to put things into that queue from the tread. |
|
Date |
User |
Action |
Args |
2016-01-27 18:52:38 | gvanrossum | set | recipients:
+ gvanrossum, vstinner, ikelly, yselivanov |
2016-01-27 18:52:38 | gvanrossum | set | messageid: <1453920758.13.0.696225220969.issue26221@psf.upfronthosting.co.za> |
2016-01-27 18:52:38 | gvanrossum | link | issue26221 messages |
2016-01-27 18:52:38 | gvanrossum | create | |
|