Update docs
This commit is contained in:
@@ -8,17 +8,6 @@ defmodule GenServer do
|
||||
will have a standard set of interface functions and include functionality for
|
||||
tracing and error reporting. It will also fit into a supervision tree.
|
||||
|
||||
```mermaid
|
||||
graph TD
|
||||
GenServer
|
||||
GenServer -. reply -.-> A
|
||||
GenServer -. reply -.-> B
|
||||
GenServer -. reply -.-> C
|
||||
A(Client #1) -- request --> GenServer
|
||||
B(Client #2) -- request --> GenServer
|
||||
C(Client #3) -- request --> GenServer
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
The GenServer behaviour abstracts the common client-server interaction.
|
||||
|
||||
@@ -326,8 +326,17 @@ defmodule Module do
|
||||
### `@nifs` (since v1.16.0)
|
||||
|
||||
A list of functions and their arities which will be overridden
|
||||
by a native implementation (NIF). See the Erlang documentation
|
||||
for more information: https://www.erlang.org/doc/man/erl_nif
|
||||
by a native implementation (NIF).
|
||||
|
||||
defmodule MyLibrary.MyModule do
|
||||
@nifs [foo: 1, bar: 2]
|
||||
|
||||
def foo(arg1), do: :erlang.nif_error(:not_loaded)
|
||||
def bar(arg1, arg2), do: :erlang.nif_error(:not_loaded)
|
||||
end
|
||||
|
||||
See the Erlang documentation for more information:
|
||||
https://www.erlang.org/doc/man/erl_nif
|
||||
|
||||
### `@on_definition`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user