Revert "fix: eliminate blocking calls causing startup freezes and UI hangs"

This reverts commit b2a1046f9d.
This commit is contained in:
2025-11-22 11:21:25 +05:00
parent 873e8b050e
commit 30606c7ec1
3 changed files with 18 additions and 59 deletions

View File

@@ -39,19 +39,7 @@ def main():
if start_sh is None:
return
# Run the initial command asynchronously to avoid blocking startup
import threading
def run_initial_command():
try:
subprocess.run(start_sh + ["cli", "--initial"], timeout=10) # Add timeout to prevent hanging
except subprocess.TimeoutExpired:
logger.warning("Initial command timed out after 10 seconds")
except Exception as e:
logger.warning(f"Initial command failed: {e}")
# Start the initial command in a background thread to not block UI startup
initial_thread = threading.Thread(target=run_initial_command, daemon=True)
initial_thread.start()
subprocess.run(start_sh + ["cli", "--initial"])
app = QApplication(sys.argv)
app.setWindowIcon(QIcon.fromTheme(__app_id__))