How to migrate tokio from 0.1 to 0.2

use tokio::runtime::TaskExecutor;

unresolved import tokio::runtime::TaskExecutor

The v0.2 equivalent of TaskExecutor is called Handle.

use tokio::runtime::Handle;


now we don't need to shutdown it manually?

The runtime is shut down when it is dropped.

do we need to manually call drop function?

The runtime is dropped when it goes out of scope.

that's great , thank you!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.