Re:How to think about `async`/`await` in Rust
by hayley-patton on Wednesday July 05, 2023 @04:52AM
(#36597636)
But I'm my own worst enemy, and blocking the event loop is unpleasant even when I do it myself. Once I had to pass compute-intensive tasks (hashing some data, which took long enough to matter) to a thread pool, to not hurt latency for other tasks in the event loop.
> Iād say that just awaiting on PMT task completion is much more convenient that setting up locking primitives.
Don't use the primitives then - write e.g. a parbegin/parallel-map atop thread primitives, and use that.
> Iād say that just awaiting on PMT task completion is much more convenient that setting up locking primitives.
Don't use the primitives then - write e.g. a parbegin/parallel-map atop thread primitives, and use that.