Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion async_tkinter_loop/async_tkinter_loop.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ async def main_loop(root: tk.Tk) -> None:
except tk.TclError:
break

await asyncio.sleep(0.01)
interval_ms = tk._tkinter.getbusywaitinterval()
await asyncio.sleep(interval_ms / 1000)


def get_event_loop() -> asyncio.AbstractEventLoop:
Expand Down
Loading