Commit 4b920885 authored by Christian Hergert's avatar Christian Hergert
Browse files

app: add spin protection at shutdown

In case we have a plugin that is spinning (looking at you
rustup), ensure that we actually exit in a reasonable amount
of time.

We still need to fix rustup, since it will spin at first use,
but this at least ensures the app will exit.
parent 6c87a28e
......@@ -538,6 +538,14 @@ ide_application_open (GApplication *application,
static gboolean
ide_application_force_exit_timeout (gpointer data)
g_warning ("Plugin caught spinning, forcing exit immediately");
static void
ide_application_shutdown (GApplication *application)
......@@ -565,6 +573,13 @@ ide_application_shutdown (GApplication *application)
_ide_battery_monitor_shutdown ();
/* In case a plugin causes us to spin at shutdown, make sure that we
* force exit to avoid spinning in the background.
gdk_threads_add_timeout (3000, /* 3 seconds */
static void
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment