crypto-crawler / crypto-crawler-rs

A rock-solid cryptocurrency crawler library.
Apache License 2.0
227 stars 73 forks source link

fix: deadlock in create_conversion_thread #28

Closed stepan-romankov closed 2 years ago

stepan-romankov commented 2 years ago

See https://github.com/crypto-crawler/crypto-crawler-rs/issues/27

stepan-romankov commented 2 years ago

@soulmachine fixed

soulmachine commented 2 years ago

Hi Stephan, your're is correct, spawn_blocking should be used here.

tokio::task::spawn() is for async operations while tokio::task::spawn_blocking() is intended for non-async operations. In the move code block there is no async operation.