Skip to content

Commit 360d9eb

Browse files
committed
yield实现简单协程
1 parent 8a095f7 commit 360d9eb

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

test/test_coroutine.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ def __init__(self):
2222
def new_task(self, task):
2323
'''
2424
Admit a newly started task to the scheduler
25-
2625
'''
2726
self._task_queue.append(task)
2827

@@ -36,7 +35,6 @@ def run(self):
3635
# Run until the next yield statement
3736
task.next()
3837
self._task_queue.append(task)
39-
4038
except StopIteration:
4139
# Generator is no longer executing
4240
pass

0 commit comments

Comments
 (0)