This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vitaly.krug
Recipients asvetlov, vitaly.krug, yselivanov
Date 2018-03-22.17:50:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1521741057.48.0.467229070634.issue33118@psf.upfronthosting.co.za>
In-reply-to
Content
Thank you for following up. My use case is this:

In the Pika AMQP client package, we have a blocking AMQP connection adapter - `BlockingConnection` - wrapped around an asynchronous AMQP connection adapter. Presently, BlockingConnection is wrapped around the asynchronous `SelectConnection` which has a home-grown proprietary IOLoop. I would like to switch BlockingConnection to use an asyncio-based adapter when running on Python3.

SelectConnection's proprietary IOLoop provides a single-stepping run function (poll with a timeout as normally determined by pending callbacks, timers, etc., process all ready events/timers/callbacks, and return). When BlockingConnection needs to send something to the AMQP broker and/or wait for an expected reply, it sends the request (which typically gets queued up in a write buffer) and then runs the proprietary IOLoop's single-stepping method in a loop (thus blocking efficiently on I/O); each time after the single-stepping IOLoop method returns, BlockingConnection checks whether the conditions of interest have been satisfied (e.g., the write buffer size being zero and AMQP Channel.OpenOk has been received).

So, another way that asyncio could help, and certainly simplest for me and my use case, is by providing a single-stepping function in the event loop implementations, such as the single-stepping method that I described at the top of the previous paragraph. E.g., `events.AbstractEventLoop.run_one_step()`.
History
Date User Action Args
2018-03-22 17:50:57vitaly.krugsetrecipients: + vitaly.krug, asvetlov, yselivanov
2018-03-22 17:50:57vitaly.krugsetmessageid: <1521741057.48.0.467229070634.issue33118@psf.upfronthosting.co.za>
2018-03-22 17:50:57vitaly.kruglinkissue33118 messages
2018-03-22 17:50:57vitaly.krugcreate