Skip to content

Commit dab06fd

Browse files
committed
Updated README
1 parent 65cdd73 commit dab06fd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,13 @@ to each other.
8181
* GenServer
8282
* `start(module, args)` - Starts a GenServer with the given module and args
8383
* `start_link(module, args)` - Starts a GenServer with the given module and args
84-
* `call* (server, action) - Sends the GenServer a action and waits for it to respond with a value.
85-
* `cast* (server, action) - Sends the GenServer a action to update a value.
86-
* `stop (server) - Stops the GenServer.
84+
* `call* (server, action)` - Sends the GenServer a action and waits for it to respond with a value.
85+
* `cast* (server, action)` - Sends the GenServer a action to update a value.
86+
* `stop (server)` - Stops the GenServer.
8787
* **Note**: Genserver expects a module the has the following functions:
8888
* `init(args)` - Must return an array containing a symbol and the initial state
8989
* `handle_call(action, from, state)` - Called when `GenServer.call` is called. This function is given the action, the pid of the calling process, and the current state. Must return `[reply, return_value, new_state]` where reply is a symbol ,usually `Symbol.for("reply"), the value to return to the process, and lastly, the new state of the GenServer.
90-
* handle_cast(action, state) - Called when `GenServer.cast` is called. his function is given the action, and the current state. Must return `[reply, return_value, new_state]` where reply is a symbol ,usually `Symbol.for("noreply"), and lastly, the new state of the GenServer.
90+
* `handle_cast(action, state)` - Called when `GenServer.cast` is called. his function is given the action, and the current state. Must return `[reply, return_value, new_state]` where reply is a symbol ,usually `Symbol.for("noreply")`, and lastly, the new state of the GenServer.
9191

9292
#### GenServer Example
9393

0 commit comments

Comments
 (0)