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

Cancelling a scheduled future while it is running doesn't cancel it #55

Open
ittaiz opened this issue Dec 26, 2013 · 2 comments
Open

Cancelling a scheduled future while it is running doesn't cancel it #55

ittaiz opened this issue Dec 26, 2013 · 2 comments

Comments

@ittaiz
Copy link
Contributor

ittaiz commented Dec 26, 2013

Hi,
If you cancel a scheduled future while it is running it is rescheduled after the current run completes.
This is in contrast to how the jdk thread pooled one works.
The test showing it is in the following gist: https://gist.github.com/ittaiz/8134058
Basically I think that "runNextPendingCommand" in DeterministicScheduler should check if the scheduledTask is not cancelled before it re-queues it.
If you accept that this is a problem I'd be happy to generate a pull request.

@npryce
Copy link
Member

npryce commented Dec 28, 2013

That sounds like a bug. Please generate a pull request.

@ittaiz ittaiz mentioned this issue Dec 29, 2013
npryce added a commit that referenced this issue Jan 6, 2014
@ittaiz
Copy link
Contributor Author

ittaiz commented Jan 14, 2014

Any chance for a 2.6.1 release?

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

No branches or pull requests

2 participants