5 ms·
Could you elaborate on why using block_on wouldn't be an acceptable solution for users that want a blocking API?
by dhon_ 2y ago
Could you elaborate on why using block_on wouldn't be an acceptable solution for users that want a blocking API?
- cmrdporcupine 2y agoWhy would I want to add tokio as a dependency if I don't use it?
- cat-whisperer 2y agoI was thinking of making it a opt-in feature, but I saw most of the usecases that I might have, might need concurrency and a runtime.
- dhon_ 2y agoYes you're right. I'd assumed that tokio was used internally in the UI but from a cursory read it doesn't seem to be the case.
- cat-whisperer 2y agoit definitely would be, that was my intention. By passing in a runtime you can either block or schedule. Giving you control on what you want to be concurrent and what you don’t.