|
|
|
|
|
by colinsane
1021 days ago
|
|
> You can break the chain by commanding the entire runtime to block on the completion of a future, but you probably shouldn’t do this pervasively since it isn’t composable. If a function blocks on a future, and that future calls a function that blocks on a future, congrats! The runtime panics! article says you can panic if you use the pattern you show. specifically, if you call `my_normal_code()` from an async context. is the author just talking about a quirk in tokio? or is this sort of wrapping intrinsically dangerous somehow? |
|