-
Notifications
You must be signed in to change notification settings - Fork 3.4k
GenServer: Rename continue
argument in handle_continue/2
#11793
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
GenServer: Rename continue
argument in handle_continue/2
#11793
Conversation
bfdf593
to
d75ac46
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine to me
If we're going back to revisit this, I would make the case that
Thoughts? |
Let’s call it |
@josevalim yes that's great for me too. |
The other expression that was used before this PR was |
So the possible names that I see are I'm in favor of |
Id go with continue_arg or continue_argument. |
Let's go with |
As I was reading the docs, it was not clear what the `continue` argument was just by reading its name.
d75ac46
to
fa825a0
Compare
| {:stop, reason :: term, new_state} | ||
when new_state: term | ||
when new_state: term, continue_arg: term |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm in doubt whether we can use the same variable for two continue_arg
values that could be different.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We cannot but in this case they are the same. We can only return a continue_arg that handle_continue
accepts.
The PR is ready for reviewing. |
💚 💙 💜 💛 ❤️ |
As I was reading the docs, it was not clear what the
continue
argumentwas just by reading its name.
handle_call and handle_cast use
request
for a similar argument,so I unified it.