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

Better cancel listener design #170

Merged
merged 1 commit into from
Sep 20, 2017
Merged

Better cancel listener design #170

merged 1 commit into from
Sep 20, 2017

Conversation

guillaumebort
Copy link
Contributor

To avoid memory leak for long execution registering several cancel listeners,
we now allow to unsubscribe when the code is not anymore interested by the cancel
signal.

@guillaumebort guillaumebort force-pushed the guillaume/cancelLeak branch 2 times, most recently from 7b40a7d to b1a5c4b Compare September 20, 2017 11:37
streams.debug(s"Execution has been cancelled by user ${user.userId}.")
true
} else false
listeners.foreach(_.thunk())
Copy link
Contributor

Choose a reason for hiding this comment

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

Just curious if a thunk fails should the other be triggered ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

To avoid memory leak for long execution registering several cancel listeners,
we now allow to unsubscribe when the code is not anymore interested by the cancel
signal.
@guillaumebort guillaumebort merged commit 7d1386c into master Sep 20, 2017
@guillaumebort guillaumebort deleted the guillaume/cancelLeak branch September 20, 2017 13:13
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.

3 participants