-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Add gen_server timeout
example
#14530
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
base: main
Are you sure you want to change the base?
Add gen_server timeout
example
#14530
Conversation
end | ||
|
||
A `Counter` server will exit with `:normal` if there are no messages in 5 seconds | ||
after the initialization or after the last `succ` call: |
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 didn't understand what succ
stands for, how about naming this :incr
since this is a counter?
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.
https://en.wikipedia.org/wiki/Successor_function
I thought succ
better explains what is going on, initial thought was to useincr
:-)
Should we change it?
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 would suggest to not use abbreviations in documentation. It's clearer to use :success
or :increment
instead.
Co-authored-by: Jean Klingler <[email protected]>
end | ||
|
||
A `Counter` server will exit with `:normal` if there are no messages in 5 seconds | ||
after the initialization or after the last `succ` call: |
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 would suggest to not use abbreviations in documentation. It's clearer to use :success
or :increment
instead.
end | ||
|
||
A `Counter` server will exit with `:normal` if there are no messages in 5 seconds | ||
after the initialization or after the last `succ` call: |
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.
after the initialization or after the last `succ` call: | |
after the initialization or after the last `:succ` call: |
GenServer.call(counter_pid, :succ) | ||
#=> 51 | ||
|
||
# After 5 secs |
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.
# After 5 secs | |
# After 5 seconds |
No description provided.