Module sync

Module sync 

Source
Expand description

Handle async calls from sync code.

This is a workaround for an issue in tokio, where you cannot call block_on from sync call that is called inside a tokio runtime. This module spawns async futures in active tokio runtime, and retrieves the result using a channel.

Enums§

AsyncError

Functions§

block_on
Blocks on the provided future and returns the result.
retry
Retry the provided closure.