Created
March 9, 2019 00:18
-
-
Save aharpole/12bf22b36aa80fc8c43e56e8a4af6507 to your computer and use it in GitHub Desktop.
iex using proposed genserver api
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iex(1)> {:ok, pid} = IncrementableValue.start_link() | |
{:ok, #PID<0.109.0>} | |
iex(2)> GenServer.update_config(pid, increment_by: 2) | |
:ok | |
iex(3)> GenServer.cast(pid, :increment) | |
:ok | |
iex(4)> GenServer.call(pid, :get_data) | |
3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment