Skip to content

Move notification to notify #58

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

Merged
merged 1 commit into from
Jan 14, 2021
Merged

Move notification to notify #58

merged 1 commit into from
Jan 14, 2021

Conversation

timholy
Copy link
Member

@timholy timholy commented Jan 4, 2021

Previously we had notify!, which had the ! because it called
setindex!. But notification does not require mutation of the owner.
This moves the work of notification from setindex! to notify and
deprecates notify!.

val = observable[]
for f in listeners(observable)
if f isa InternalFunction
f(val)
Copy link
Member Author

Choose a reason for hiding this comment

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

I should point out that this bypass will need to go away (see #50), but I have that queued for a later pull request. (This is the second in a series of 9.)

Previously we had `notify!`, which had the `!` because it called
`setindex!`. But notification does not require mutation of the owner.
This moves the work of notification from `setindex!` to `notify` and
deprecates `notify!`.
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.

2 participants