Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
zokier
· 3y ago · 0 comments
But tokio is multithreaded, so you need to deal with all that complexity?
Comments
[–]
brundolf
3y ago
I believe its abstractions work the same way regardless of how many threads you do or don't give it
[–]
insanitybit
3y ago
The multithreaded runtime requires that your futures be Send.
[–]
pkolaczk
3y ago
Which isn't a big deal in most situations as you can still use mutable variables without mutexes, even across await points.
[–]
fnordpiglet
3y ago
That’s a runtime option, and I think it specifically matters when you’re using tasks. If you’re using network and io futures (I’m not sure of this) I don’t think it returns a thread backed future.
[–]
mcronce
3y ago
Tokio has a single-threaded executor as well