Skip to content

Commit 617665f

Browse files
authored
Update p10_defining_an_actor_task.rst
a.close() a.join() with out this ,no result
1 parent 3978bdd commit 617665f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

source/c12/p10_defining_an_actor_task.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,9 @@ actor模式的魅力就在于它的简单性。
153153
a.start()
154154
a.send(('A', 1)) # Invokes do_A(1)
155155
a.send(('B', 2, 3)) # Invokes do_B(2,3)
156+
a.close()
157+
a.join()
158+
156159
157160
作为另外一个例子,下面的actor允许在一个工作者中运行任意的函数,
158161
并且通过一个特殊的Result对象返回结果:

0 commit comments

Comments
 (0)