HN Top New Show Ask Jobs

settings

Theme

Hand Mode

Feed

Comment by tcfhgj

Comment by tcfhgj a day ago

0 replies

View on Hacker News

Iirc I had a situation a while back, in which I used async await with tokio with a non Send or Sync type and it compiled when I didn't use spawn[1] (implying multithreading) but a simple loop with sequential processing.

Only when I wanted to enable parallelism using spawn, I got a compilation error.

[1]: https://docs.rs/tokio/latest/tokio/task/fn.spawn.html