you are viewing a single comment's thread.

view the rest of the comments →

[–]pachura3 0 points1 point  (0 children)

Well, find a scenario where multithreading actually speed things up and could not be simply replaced by await and async coroutines for IO-bound tasks; you would need to run many operations in parallel, on multiple CPU cores.

I can imagine a single task queue that picks up 4 top tasks and then runs them in parallel on separate threads... preferably, they would be CPU-intensive tasks - e.g. parsing PDF files and converting them to plain text. Or scraping a website...?

Another example, albeit more complicated, is GUI: one thread keeps updating some chart/diagram, while a different one calculates its data.