Skip to content

Commit dedaf2c

Browse files
author
luhaozhao
committed
update process
1 parent 388c2b4 commit dedaf2c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

11-process.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ end
225225

226226
执行一下```iex kv.exs```
227227
```elixir
228-
iex> {:ok, pid} = KV.start
228+
iex> {:ok, pid} = KV.start_link
229229
#PID<0.62.0>
230230
iex> send pid, {:get, :hello, self()}
231231
{:get, :hello, #PID<0.41.0>}
@@ -272,7 +272,7 @@ iex> Agent.get(pid, fn map -> Map.get(map, :hello) end)
272272
:world
273273
```
274274

275-
```Agent.start/2```方法加上```:name```选项,可以自动为其注册一个名字。
275+
```Agent.start_link/2```方法加上```:name```选项,可以自动为其注册一个名字。
276276

277277
除了agents,Elixir还提供了一套API来创建通用服务器(generic servers,称作GenServer),任务等。
278278
这些都是建立在进程概念之上的实现。其它概念,包括“管理者”树,都可以在《高级》篇里找到更详细的说明。

0 commit comments

Comments
 (0)