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 stream activate and deactivate methods #933

Merged
merged 2 commits into from
Oct 14, 2016
Merged

Conversation

philippjfr
Copy link
Member

Adds Stream.activate and Stream.deactivate methods to streams to be triggered just before updating parameters and just after triggering the stream respectively. This allows defining custom actions after an event, e.g. in order to reset the value after an event has been processed.

@jlstevens
Copy link
Contributor

I think it is a bit odd that activate is called only if you use update. This means:

  • If you use update with trigger=False, then activate is called but deactivate isn't.
  • If you use the trigger classmethod directly then deactivate is called by activate isn't.

Can both activate and deactivate be used in the trigger classmethod?

@jlstevens
Copy link
Contributor

Looks good. Merging.

@jlstevens jlstevens merged commit 69d0df5 into master Oct 14, 2016
@philippjfr philippjfr deleted the streams_deactivate branch January 7, 2017 15:01
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

2 participants