Skip to content

Commit 6d8cfcd

Browse files
committed
asyncio_micro: Clean up logging.
1 parent 26d7657 commit 6d8cfcd

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

asyncio_micro/asyncio_micro.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def run_forever(self):
4444
while True:
4545
if self.q:
4646
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))
4848
# __main__.mem_info()
4949
tnow = self.time()
5050
delay = t - tnow
@@ -61,9 +61,9 @@ def run_forever(self):
6161
try:
6262
if args == ():
6363
args = (None,)
64-
log.debug("Gen %s send args: %s", cb, args)
64+
log.debug("Coroutine %s send args: %s", cb, args)
6565
ret = cb.send(*args)
66-
log.debug("Gen %s yield result: %s", cb, ret)
66+
log.debug("Coroutine %s yield result: %s", cb, ret)
6767
if isinstance(ret, SysCall):
6868
if isinstance(ret, Sleep):
6969
delay = ret.args[0]
@@ -86,10 +86,9 @@ def run_forever(self):
8686
# Just reschedule
8787
pass
8888
else:
89-
print(ret, type(ret))
90-
assert False
89+
assert False, "Unsupported coroutine yield value: %r (of type %r)" % (ret, type(ret))
9190
except StopIteration as e:
92-
log.debug("Gen finished: %s", cb)
91+
log.debug("Coroutine finished: %s", cb)
9392
continue
9493
self.call_later(delay, cb, *args)
9594

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy