4 ms·
This works with runtime agnostic futures, but you can't do any I/O without requiring a specific runtime. reqwest for example doesn't use a generic block_on, it
by ibraheemdev 4y ago
This works with runtime agnostic futures, but you can't do any I/O without requiring a specific runtime. reqwest for example doesn't use a generic block_on, it runs tokio behind the scenes.
- armchairhacker 4y agoYou can spawn a simple Tokio I/O runtime with Builder::new_current_thread().with_io().build(). The catch is that it’s not really “simple”, and idk the performance penalty.