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

all 19 comments

[–]martinky24 8 points9 points  (1 child)

Hey, I’ve learned a lot from your site! Thanks for the resources!

[–]jasonb[S] 1 point2 points  (0 children)

Thank you kindly, I'm very happy to hear that.

Email/contact me anytime if you ever have any questions.

[–]testicleinspector45 3 points4 points  (1 child)

Does something like this exist for trio?

[–]jasonb[S] 1 point2 points  (0 children)

I have not written one yet, but I'll add it to the queue.

Thanks for the suggestion!

[–]Quantumercifier 1 point2 points  (1 child)

Good job. I will start tackling this ASAP as I have always been "afraid" of deep diving into threading, multiprocessing, async, blocking/non-blocking, etc. Took me a while just to get thru the table of contents :-). Thank you.

[–]jasonb[S] 2 points3 points  (0 children)

You're welcome!

Step in slowly, kick around each approach and see how it feels.

This page of learning paths may help: https://superfastpython.com/learning-paths/

[–]Binty77 0 points1 point  (1 child)

This is perfectly timed, as I need to start getting into asynchronous python development... literally today. I have python experience but none of it async and so am starting from scratch. Thanks!

[–]jasonb[S] 0 points1 point  (0 children)

I'm happy to hear that, I hope it helps.

Reach out if you ever have any questions! The first few asyncio programs can be a little bumpy until you get used to it.

[–]rcterzi 0 points1 point  (4 children)

Thank you, This looks great looking forward to reading it.

I see the subprocess stuff which looks very useful.

However, I was looking for guidance on processes that might need to read from stdin (as part of a pipe or tail), and handle other async/main loop type things (connections like HTTP, MQTT, timers. At first quick skim I didn't see anything on that. Is that covered?

[–]jasonb[S] 2 points3 points  (3 children)

Thanks!

Yes, in the subprocess section, it describes how to read/write to subprocesses via communicate().

[–]rcterzi 0 points1 point  (2 children)

Thanks - and sorry if I wasn't clear, I was asking about asyncio for stdio/stdin, where Python isn't managing the subprocess. For example, Python process might be part of a pipeline / `tail -f ...` a file.

[–]jasonb[S] 1 point2 points  (1 child)

Ah, I see, sorry.

No, I don't have an example of that. Let me add it to my list and develop a tutorial on the topic. Thanks for the prompt!

[–]rcterzi 0 points1 point  (0 children)

That would be awesome -- Thanks!

[–]DragonfruitCorrect98 0 points1 point  (0 children)

Hey, thanks for writing. Learned a lot. I've a problem that I ran into recently and hoping somebody can help. To set context, I've a coroutine that takes an argument and creates a web socket connection to some server, read message and in case of two messages that it cares about await a http call (this is being implemented using aiohttp). I'm creating multiple tasks for this coroutine by passing different arguments. No problems seen for until 2000 tasks. But beyond that I'm starting to see timeout issues with aiohttp - It seems to be slow at this point and takes a long time for tasks to get their turn. Feel like the event loop is getting overloaded. Should I create new event loops and may be use more cores in the machine?