python-trio / trio

Trio – a friendly Python library for async concurrency and I/O
https://trio.readthedocs.io
Other
5.98k stars 325 forks source link

Would be to actually port aiomultiprocess to trio? #3009

Closed allrobot closed 3 weeks ago

allrobot commented 3 weeks ago

Personally, I quite like the syntax of aiomultiprocess.Pool(), as each process will run an asynchronous event loop, which can improve IO performance. The performance depends on the number of available cores and the workload.

Although there is trio.from_thread.run, it is a bit inconvenient to use.

I hope trio adds a multi-threaded pool to get rid of the GIL limitation.

CoolCat467 commented 3 weeks ago

Sounds like you are looking for https://github.com/goodboy/tractor:

tractor is a structured concurrent, multi-processing runtime built on trio.