Skip to content

Commit a480610

Browse files
authored
Merge pull request #11 from higucheese/bugfix
Avoid 100% CPU on asyncio.sleep(0)
2 parents 839e8d5 + 4d3e365 commit a480610

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CONTRIBUTORS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ issues, offering improvements to the documentation or contributing code.
1818
We are certain the list is incomplete; please let one of us know by opening an [issue on GitHub](https://github.com/BruceSherwood/vpython-jupyter/issues) and we will be happy to add your name!
1919

2020
+ Wayne Decatur (@fomightez)
21+
+ Tomokazu Higuchi (@higucheese)
2122
+ Antti Kaihola (@akaihola)
2223
+ Patrick Melanson (@pmelanson)
2324
+ Gopal Sharma (@Hippogriff)

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)