Author gvanrossum
Recipients gvanrossum, haypo, ikelly, yselivanov
Date 2016-01-27.18:52:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1453920758.13.0.696225220969.issue26221@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2016-01-27 18:52:38gvanrossumsetrecipients: + gvanrossum, haypo, ikelly, yselivanov
2016-01-27 18:52:38gvanrossumsetmessageid: <1453920758.13.0.696225220969.issue26221@psf.upfronthosting.co.za>
2016-01-27 18:52:38gvanrossumlinkissue26221 messages
2016-01-27 18:52:38gvanrossumcreate