Re: asyncio question

2020-11-03 Thread Kyle Stanley
On Tue, Nov 3, 2020 at 3:27 AM Frank Millman wrote: > It works, and it does look neater. But I want to start some background > tasks before starting the server, and cancel them on Ctrl+C. > > Using the 'old' method, I can wrap 'loop.run_forever()' in a > try/except/finally, check for

Re: Asyncio question (rmlibre)

2020-02-28 Thread Frank Millman
On 2020-02-28 1:37 AM, rmli...@riseup.net wrote: > What resources are you trying to conserve? > > If you want to try conserving time, you shouldn't have to worry about > starting too many background tasks. That's because asyncio code was > designed to be extremely time efficient at handling

Re: Asyncio question (rmlibre)

2020-02-27 Thread rmlibre
What resources are you trying to conserve? If you want to try conserving time, you shouldn't have to worry about starting too many background tasks. That's because asyncio code was designed to be extremely time efficient at handling large numbers of concurrent async tasks. For your

Re: Asyncio question

2020-02-21 Thread Frank Millman
On 2020-02-21 11:13 PM, Greg Ewing wrote: On 21/02/20 7:59 pm, Frank Millman wrote: My first attempt was to create a background task for each session which runs for the life-time of the session, and 'awaits' its queue. It works, but I was concerned about having a lot a background tasks active

Re: Asyncio question

2020-02-21 Thread Greg Ewing
On 21/02/20 7:59 pm, Frank Millman wrote: My first attempt was to create a background task for each session which runs for the life-time of the session, and 'awaits' its queue. It works, but I was concerned about having a lot a background tasks active at the same time. The whole point of

RE: asyncio Question

2019-03-15 Thread Joseph L. Casale
> -Original Message- > From: Python-list bounces+jcasale=activenetwerx@python.org> On Behalf Of Simon > Connah > Sent: Thursday, March 14, 2019 3:03 AM > To: Python > Subject: asyncio Question > > Hi, > > Hopefully this isn't a stupid question. For the record I am using Python >

Re: asyncio question

2016-12-13 Thread Frank Millman
"Ian Kelly" wrote in message news:CALwzid=vdczAH18mHKaL7ryvDUB=7_y-JVUrTkRZ=gkz66p...@mail.gmail.com... On Tue, Dec 13, 2016 at 6:15 AM, Frank Millman wrote: > The client uses AJAX to send messages to the server. It sends the > message > and continues processing, while a

Re: asyncio question

2016-12-13 Thread Ian Kelly
On Tue, Dec 13, 2016 at 6:15 AM, Frank Millman wrote: > The client uses AJAX to send messages to the server. It sends the message > and continues processing, while a background task waits for the response and > handles it appropriately. As a result, the client can send a