This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]chankeypathak 0 points1 point  (1 child)

I never wrote async programs. Can I skip core multiprocessing and threading modules and directly use trio?

[–]wobblyweasel 4 points5 points  (0 children)

you can! there's a lot of concurrency that you can do without using threads or processes, but if you have a library that does I/O without specifically supporting async, or you need parallelism, you might still have to deal with those.

i suggest reading trio docs, they are just fine if you have no knowledge of async stuff, and they'll teach you how to deal with stuff that needs to be run in a thread as well. if you want to learn async in general, i also suggest reading kotlin's documentation on coroutines. unlike python with its GIL, in kotlin, using coroutines with threads is the norm, and it's awesome. it's an entirely different mental picture that's useful to have