You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-5Lines changed: 4 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -79,16 +79,15 @@ to each other.
79
79
* `Scheduler.run(fun, args, context = null)` - A static generator function used to wrap a normal function or generator. If fun is a function, it returns the value, if it's a generator, then it delegates yielding to the generator.
80
80
81
81
* GenServer
82
-
* **Note**: Genserver expects a module the has the following functions:
83
-
* `init(args)` - Must return an array containing a symbol and the initial state
84
-
* `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.
85
-
* 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.
86
-
87
82
* `start(module, args)` - Starts a GenServer with the given module and args
88
83
* `start_link(module, args)` - Starts a GenServer with the given module and args
89
84
* `call* (server, action) - Sends the GenServer a action and waits for it to respond with a value.
90
85
* `cast* (server, action) - Sends the GenServer a action to update a value.
91
86
* `stop (server) - Stops the GenServer.
87
+
* **Note**: Genserver expects a module the has the following functions:
88
+
* `init(args)` - Must return an array containing a symbol and the initial state
89
+
* `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.
0 commit comments