How to use tokio thread

thread 'main' panicked at 'Cannot start a runtime from within a runtime. This happens because a function (like `block_on`) attempted to block the current thread while the thread is being used to drive asynchronous tasks.', /home/cery/.cargo/registry/src/

i don't know how this be occurred. can somebody help me?

You can't start a runtime inside a runtime. Are you e.g. using #[tokio::main] and Builder at the same time? You can see where it happens by turning on backtraces.

thread 'tokio-runtime-worker' panicked at 'there is no timer running, must be called from the context of Tokio runtime', /home/cery/.cargo/registry/src/

i remove that error but the new occur

You still need .enable_all().

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.