Re: Using asyncio workers in a `concurrent.futures` interface

2014-08-12 Thread Ian Kelly
On Tue, Aug 12, 2014 at 11:03 PM, Marko Rauhamaa wrote: > > Ian Kelly : > > > On Tue, Aug 12, 2014 at 11:02 AM, cool-RR wrote: > >> And that's it, no coroutines, no `yield from`. Since, if I understand > >> correctly, asyncio requires a mainloop, it would make sense for the > >> AsyncIOExecutor t

Re: Using asyncio workers in a `concurrent.futures` interface

2014-08-12 Thread Marko Rauhamaa
Ian Kelly : > On Tue, Aug 12, 2014 at 11:02 AM, cool-RR wrote: >> And that's it, no coroutines, no `yield from`. Since, if I understand >> correctly, asyncio requires a mainloop, it would make sense for the >> AsyncIOExecutor to have a thread of its own in which it could run its >> mainloop. > >

Re: Using asyncio workers in a `concurrent.futures` interface

2014-08-12 Thread Ian Kelly
On Tue, Aug 12, 2014 at 11:02 AM, cool-RR wrote: > And that's it, no coroutines, no `yield from`. Since, if I understand > correctly, asyncio requires a mainloop, it would make sense for the > AsyncIOExecutor to have a thread of its own in which it could run its > mainloop. I think that puttin

Re: Using asyncio workers in a `concurrent.futures` interface

2014-08-12 Thread MRAB
On 2014-08-12 18:02, cool-RR wrote: Hello everybody! I have a question. I have a Django app running on Heroku. I need to run about 100 worker threads there to do uploads/downloads simultaneously. A Heroku Dyno has only 512MB of memory, so I'm reluctant to run 100 worker threads. (I've had Dynos

Re: Using asyncio workers in a `concurrent.futures` interface

2014-08-12 Thread Marko Rauhamaa
cool-RR : > If I understand correctly [asyncio] would let me run multiple uploads > and downloads efficiently in one thread, which would conserve more > resources than using threads. Asyncio does make it convenient to multiplex event on one or more threads. Threads have their uses (exploiting mul

Using asyncio workers in a `concurrent.futures` interface

2014-08-12 Thread cool-RR
Hello everybody! I have a question. I have a Django app running on Heroku. I need to run about 100 worker threads there to do uploads/downloads simultaneously. A Heroku Dyno has only 512MB of memory, so I'm reluctant to run 100 worker threads. (I've had Dynos crash from lack of memory when usi