From 12a3a2d7feb30f153a529954c7b206a7c08c1147 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 7 Jul 2022 11:38:12 +0530 Subject: [PATCH] Only set switch interval after prewarm fork --- kitty/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kitty/main.py b/kitty/main.py index d84b58f00..af72ff7fc 100644 --- a/kitty/main.py +++ b/kitty/main.py @@ -357,8 +357,6 @@ def set_locale() -> None: def _main() -> None: running_in_kitty(True) - with suppress(AttributeError): # python compiled without threading - sys.setswitchinterval(1000.0) # we have only a single python thread try: set_locale() @@ -410,6 +408,8 @@ def _main() -> None: prewarm = fork_prewarm_process(opts) if prewarm is None: raise SystemExit(1) + with suppress(AttributeError): # python compiled without threading + sys.setswitchinterval(1000.0) # we have only a single python thread init_glfw(opts, cli_opts.debug_keyboard, cli_opts.debug_rendering) if cli_opts.watcher: from .window import global_watchers