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

Added optional callback to removeDelegate #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

melle
Copy link

@melle melle commented Dec 15, 2015

Added optional callback that is called when the last delegate was removed

@netbe
Copy link
Contributor

netbe commented Dec 16, 2015

looks good to me , thks for the contribution :). Will let @nilsgrabenhorst check that too

@nilsgrabenhorst
Copy link
Contributor

Hi Thomas, thanks for the PR! Out of curiosity:

  1. What is the use case for this change?
  2. Why didn't -removeDelegate: followed by -delegateCount work for you?

@melle
Copy link
Author

melle commented Dec 18, 2015

Our use case here is to cancel a long running operation, that is pointless without any observer left. The check for delegateCount should be thread safe, that's why i did it that way.

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