2 ms·
I was trying to make sense of this sentence of the original commenter: "In new code I try to use threads, but certain things like yield which rely on async are
by bhouston 2y ago
I was trying to make sense of this sentence of the original commenter: "In new code I try to use threads, but certain things like yield which rely on async are simply too common and useful to stop using."
Seems to suggest that threads and yield/async were mutually exclusive. I misunderstood. I will move on.
- te_chris 2y agoTo use async await you have to execute the code in a run loop.
- nwatson 2y ago... and you can push CPU-intensive stuff off to a thread-executor to avoid blocking the async run-loop
- trollbridge 2y agoThey aren't mutually exclusive, but are two basically independent features. The way you would code for one and the other is completely different.