←back to thread

320 points willm | 3 comments | | HN request time: 0s | source
1. rcarmo ◴[] No.45106550[source]
I've had no real issues with async, although I primarily use libraries like aiohttp and aiosqlite and even write my own helpers (https://github.com/rcarmo/aioazstorage is a good example).

The vast majority of the Python code I wrote in the last 5-6 years uses asyncio, and most of the complaints I see about it (hard to debug, getting stuck, etc.) were -- at least in my case -- because there were some other libraries doing unexpected things (like threading or hard sleep()).

Coming from a networking background, the way I can deal with I/O has been massively simplified, and coroutines are quite useful.

But as always in HN, I'm prepared for that to be an unpopular opinion.

replies(1): >>45106750 #
2. JackSlateur ◴[] No.45106750[source]
I share your experience

asyncio is easier than threads or multiprocess: less locking issue, easier to run small chunks of code in // (easier to await something than to create a thread that run some method)

replies(1): >>45125391 #
3. zelphirkalt ◴[] No.45125391[source]
There is no locking issue, if you don't mutate some global state from more than 1 thread at the same time. If you program mostly in pure functions, this is a non issue.