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

Remove cancelled work from the threadpool queue #1375

Merged
merged 1 commit into from Oct 6, 2016

Conversation

mattrjacobs
Copy link
Contributor

This addresses #372.

Note that the solution is much simpler than discussed in #372. Since we control the object handed back to the caller (Future / Observable), we can straightforwardly add the queue removal operation to the unsubscription.

As in the ScheduledThreadPoolExecutor.removeOnCancelPolicy solution that JDK7 uses, this only applies to work sitting in the queue. Work already in the pool is handled directly by the JDK.

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.

None yet

1 participant