Skip to content

Commit f51b3c2

Browse files
committed
Avoid 100% CPU on asyncio.sleep(0)
1 parent 839e8d5 commit f51b3c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vpython/with_notebook.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ async def wsperiodic():
162162
msg = {'content': {'data': [m]}}
163163
baseObj.glow.handle_msg(msg)
164164

165-
await asyncio.sleep(0)
165+
await asyncio.sleep(0.1)
166166

167167
loop = asyncio.get_event_loop()
168168
loop.create_task(wsperiodic())

0 commit comments

Comments
 (0)