-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add send_self method #365
Add send_self method #365
Conversation
I'd prefer if this was kept without |
@davidkna Good point! I'll check it 👌 |
... but I haven't seen this needs in my work. Could you explain, why do you need callbacks in properties? You should prefer to use agents to communicate components. |
@deniskolodin I haven't used agents yet but I'll explore using them for this instead. |
I have moved backward incompatible changes to a separate PR #367 |
bors r+ |
365: Add send_self method r=DenisKolodin a=DenisKolodin In practice, often required a method to send messages itself to a component immediately. This PR adds: `send_self` method and add a requirement for a mutable reference to `send_back` method. Co-authored-by: Denis Kolodin <deniskolodin@gmail.com>
Build succeeded |
Wait, how is send_self different from calling the update? |
@madmaxio I think calling |
Nice, thx. |
In practice, often required a method to send messages itself to a component immediately.
This PR adds:
send_self
method and add a requirement for a mutable reference tosend_back
method.