Skip to content
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

Implement abort for JoinHandle #87

Merged
merged 1 commit into from
Nov 22, 2022
Merged

Conversation

akoshelev
Copy link
Contributor

In our code we actually call abort method on tokio's JoinHandle struct, once I tried to use shuttle, I saw that calling abort causes another panic

...
thread 'main' panicked at 'not implemented', /Users/koshelev/.cargo/registry/src/github.51.al-1ecc6299db9ec823/shuttle-0.4.1/src/future/mod.rs:42:9
stack backtrace:

Not sure if this is the right way to implement it, happy to iterate on that as well as adding more tests if required. I am not confident that park used inside the unit test does what I expect (park task , my flaky finder hasn't discovered any issues with it though:

flaky-finder -j3 -r500 --continue "cargo test --color=always --test mod future::basic::join_handle_abort"
>> Warming up...done.
  [00:01:06] [████████████████████████████████████████] (500/500, ETA 0s)
>> Nothing found 👍

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link
Member

@jamesbornholt jamesbornholt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

In our code we actually call `abort` method on tokio's `JoinHandle` struct, once I tried to use shuttle, I saw that calling `abort` causes another panic

```bash
...
thread 'main' panicked at 'not implemented', /Users/koshelev/.cargo/registry/src/github.51.al-1ecc6299db9ec823/shuttle-0.4.1/src/future/mod.rs:42:9
stack backtrace:
```

Not sure if this is the right way to implement it, happy to iterate on that as well as adding more tests if required.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants