Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6d8cfcd

Browse files
author
Paul Sokolovsky
committed
asyncio_micro: Clean up logging.
1 parent26d7657 commit6d8cfcd

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
whileTrue:
4545
ifself.q:
4646
t,cnt,cb,args=heapq.heappop(self.q)
47-
log.debug("Nexttask to run: %s", (t,cnt,cb,args))
47+
log.debug("Nextcoroutine 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
ifargs== ():
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
ifisinstance(ret,SysCall):
6868
ifisinstance(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-
assertFalse
89+
assertFalse,"Unsupported coroutine yield value: %r (of type %r)"% (ret,type(ret))
9190
exceptStopIterationase:
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)

[8]ページ先頭

©2009-2025 Movatter.jp