3 ms·
But tokio is multithreaded, so you need to deal with all that complexity?
by zokier 4y ago
But tokio is multithreaded, so you need to deal with all that complexity?
- brundolf 4y agoI believe its abstractions work the same way regardless of how many threads you do or don't give it
- insanitybit 4y agoThe multithreaded runtime requires that your futures be Send.
- pkolaczk 4y agoWhich isn't a big deal in most situations as you can still use mutable variables without mutexes, even across await points.
- mcronce 4y agoTokio has a single-threaded executor as well
- fnordpiglet 4y agoThat’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.