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

do_send behaviour is inconsistent #60

Closed
uzytkownik opened this issue Mar 19, 2018 · 3 comments
Closed

do_send behaviour is inconsistent #60

uzytkownik opened this issue Mar 19, 2018 · 3 comments

Comments

@uzytkownik
Copy link

do_send on Addr is documented as:

Send message unconditionally

This method ignores actor's mailbox capacity, it silently fails if mailbox is closed.

However do_send on Recipient is:

Send message

Deliver message even if recipient's mailbox is full

It seems strange to have 2 similarly named methods with subtly difference in semantics which cannot be easily explained by nature of calls. I had expected that addr.do_send(...) and addr.recipient().do_send(...) are equivalend.

@fafhrd91
Copy link
Member

this is mainly ergonomic question. main use case for do_send is send and forget, returning Result<> would need to use it all the time

@uzytkownik
Copy link
Author

@fafhrd91 I'm not saying that send and forget is not a valid use-case. It is just strange that it behaves differently across structs.

@fafhrd91
Copy link
Member

i may revisit this later

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

No branches or pull requests

2 participants