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

@philippjfr philippjfr commented Oct 14, 2016

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

@jlstevens jlstevens commented Oct 14, 2016

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?

Loading

@philippjfr philippjfr force-pushed the streams_deactivate branch from acee5d2 to 96497f1 Oct 14, 2016
@philippjfr philippjfr force-pushed the streams_deactivate branch from 96497f1 to 48b8643 Oct 14, 2016
@jlstevens
Copy link
Contributor

@jlstevens jlstevens commented Oct 14, 2016

Looks good. Merging.

Loading

@jlstevens jlstevens merged commit 69d0df5 into master Oct 14, 2016
4 checks passed
Loading
@philippjfr philippjfr deleted the streams_deactivate branch Jan 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants