Re:How to choose the right Python concurrency API
by infinite8s on Wednesday August 10, 2022 @10:44AM
(#32412855)
+1 for trio. I used it in a past job to proxy a socket-based API to websockets and it was easy to write and debug.
Tractor is also architected similar to Erlangs OTP system, which trio with it's structured concurrency makes easy to reason about.
I work with trio/anyio on a daily basis for my job, and I'd always recommend people use it for their concurrency framework and then use await anyio.to_thread.run_sync() to spawn threads if needed.
I'll also add that if you need multi-processor execution, look at https://pypi.org/project/tractor/