From b95e3c4988ef2c34a9abb59fbd54d0400ecf8814 Mon Sep 17 00:00:00 2001 From: Marcos Pinto Date: Thu, 15 Nov 2007 04:38:35 +0000 Subject: [PATCH] hopefully fix shutdown hang and tweak win compile --- setup.py | 2 +- src/deluge_core.cpp | 2 +- src/interface.py | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 77193b5e8..d641aa0b3 100644 --- a/setup.py +++ b/setup.py @@ -135,7 +135,7 @@ if not OS == "win": sysconfig.get_config_vars()["OPT"] = ' '.join(cv_opt.split()) else: boosttype = 'mt' - EXTRA_COMPILE_ARGS = [ '-DBOOST_WINDOWS', + EXTRA_COMPILE_ARGS = [ '-O2', '-DBOOST_WINDOWS', '-Wno-missing-braces', '-DWIN32_LEAN_AND_MEAN', '-D_WIN32_WINNT=0x0500', diff --git a/src/deluge_core.cpp b/src/deluge_core.cpp index 38cc2f73c..2ee77f5a7 100644 --- a/src/deluge_core.cpp +++ b/src/deluge_core.cpp @@ -435,7 +435,7 @@ static PyObject *torrent_quit(PyObject *self, PyObject *args) delete M_settings; session_proxy sp = M_ses->abort(); printf("core: shutting down session...\r\n"); - delete M_ses; // 100% CPU... + delete M_ses; Py_DECREF(M_constants); printf("core shut down.\r\n"); diff --git a/src/interface.py b/src/interface.py index b082b89d5..98ff6de82 100644 --- a/src/interface.py +++ b/src/interface.py @@ -1644,6 +1644,7 @@ want to remove all seeding torrents?")): self.shutdown() def shutdown(self): + gtk.gdk.threads_enter() self.window.hide() self.save_column_widths() self.save_window_settings()