@@ -44,7 +44,7 @@ def run_forever(self):
44
44
while True :
45
45
if self .q :
46
46
t , cnt , cb , args = heapq .heappop (self .q )
47
- log .debug ("Next task to run: %s" , (t , cnt , cb , args ))
47
+ log .debug ("Next coroutine to run: %s" , (t , cnt , cb , args ))
48
48
# __main__.mem_info()
49
49
tnow = self .time ()
50
50
delay = t - tnow
@@ -61,9 +61,9 @@ def run_forever(self):
61
61
try :
62
62
if args == ():
63
63
args = (None ,)
64
- log .debug ("Gen %s send args: %s" , cb , args )
64
+ log .debug ("Coroutine %s send args: %s" , cb , args )
65
65
ret = cb .send (* args )
66
- log .debug ("Gen %s yield result: %s" , cb , ret )
66
+ log .debug ("Coroutine %s yield result: %s" , cb , ret )
67
67
if isinstance (ret , SysCall ):
68
68
if isinstance (ret , Sleep ):
69
69
delay = ret .args [0 ]
@@ -86,10 +86,9 @@ def run_forever(self):
86
86
# Just reschedule
87
87
pass
88
88
else :
89
- print (ret , type (ret ))
90
- assert False
89
+ assert False , "Unsupported coroutine yield value: %r (of type %r)" % (ret , type (ret ))
91
90
except StopIteration as e :
92
- log .debug ("Gen finished: %s" , cb )
91
+ log .debug ("Coroutine finished: %s" , cb )
93
92
continue
94
93
self .call_later (delay , cb , * args )
95
94
0 commit comments