-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow passing Tokio Handle on ntex-rt #336
Allow passing Tokio Handle on ntex-rt #336
Conversation
idea is right, but I would make "handle: Option", and added ".new_with_handle(..)" methods. |
as I remember you can use Handle::new() instead of actual handle. |
I wasn't able to find a |
56ddf56
to
758fa37
Compare
Indeed |
758fa37
to
420381c
Compare
use current(), and something like use_current_handle: bool in builder |
420381c
to
82be8c5
Compare
I have some tests that take longer than 60s on Ntex-rt and they fail with timeout. I believe I have reached the peak of my understanding of how the underlying system works here 😛 If you have more hints or advice let me know :D |
add env_logger::init() to your test and try to run it with RUST_LOG=trace |
9049c36
to
0134187
Compare
I have tried that and also tried debugging it. It seems that the other test is panicking because it cannot find a configured runtime and panics at: |
default behavior must be same as before, running with handler must be enabled explicitly |
But if this is not enabled with a Cargo feature then how am I going to import |
you can use try_current(), if it returns error then switch to old behavior |
use tok_io::runtime::Handle; 🤔 |
mark import with feature or move it inside block that already marked with feature |
0134187
to
0ca1df6
Compare
0ca1df6
to
e73a699
Compare
Ok I am now thinking this issue is above my skills with the language 😛 Thank for your time and your explanations though 🙏🏻 |
I will take check what I can do next weekend |
here is example how to use tokio https://github.com/ntex-rs/examples/blob/1a365350df3a9c904da5fbaa3b1e479fdb9191da/tokio/src/main.rs#L77 |
No description provided.