Open fin-ger opened 6 years ago
Please, read examples carefully. You need to use tokio::runtime::current_thread::Runtime
instead of tokio::runtime::Runtime
.
@Emulator000, what do you think about adding multithreading?
@ark0f it's a feature that I want to implement but we must be careful with performances, using Arc and Mutex is certainly slower than Rc and RefCell.
Is there a reason that we need a mutex? Isnt an RwLock enough? (locked vs. unlocked read)
I am currently struggling to get a Future of this crate resolved in a tokio::spawn or even tokio::run. The only thing that is working (but not fitting for me) is the current_thread runtime from the examples. This is the code I am using:
This is the compile error I get:
How do I use the telegram-bot API with tokio?