Skip to content

Commit 04da5cb

Browse files
committed
rename coroutine
1 parent 88ea445 commit 04da5cb

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

samples/advance/do_prod_cons.py samples/async/coroutine.py

-3
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
#!/usr/bin/env python3
22
# -*- coding: utf-8 -*-
33

4-
import time
5-
64
def consumer():
75
r = ''
86
while True:
97
n = yield r
108
if not n:
119
return
1210
print('[CONSUMER] Consuming %s...' % n)
13-
time.sleep(1)
1411
r = '200 OK'
1512

1613
def produce(c):

0 commit comments

Comments
 (0)