summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2013-12-30 02:30:40 +0000
committerDavid Robillard <d@drobilla.net>2013-12-30 02:30:40 +0000
commitd88c1ffb6a725ba66ca85ad2410e4f45ddb7afbc (patch)
tree4a5dafd185dd6dc69e1b1de4d65375606a757599
parent927a89c98b6e55305bfe7853906f2b5cc13f463f (diff)
downloadingen-d88c1ffb6a725ba66ca85ad2410e4f45ddb7afbc.tar.gz
ingen-d88c1ffb6a725ba66ca85ad2410e4f45ddb7afbc.tar.bz2
ingen-d88c1ffb6a725ba66ca85ad2410e4f45ddb7afbc.zip
Fix deadlocks on exit.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5225 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r--src/World.cpp15
-rw-r--r--src/server/JackDriver.cpp2
2 files changed, 9 insertions, 8 deletions
diff --git a/src/World.cpp b/src/World.cpp
index 55cdea9c..1e0f82c0 100644
--- a/src/World.cpp
+++ b/src/World.cpp
@@ -154,6 +154,14 @@ public:
~Impl()
{
+ // Delete module objects but save pointers to libraries
+ typedef std::list<Glib::Module*> Libs;
+ Libs libs;
+ for (auto& m : modules) {
+ libs.push_back(m.second->library);
+ delete m.second;
+ }
+
serialiser.reset();
parser.reset();
interface.reset();
@@ -163,13 +171,6 @@ public:
interface_factories.clear();
script_runners.clear();
- // Delete module objects but save pointers to libraries
- typedef std::list<Glib::Module*> Libs;
- Libs libs;
- for (auto& m : modules) {
- libs.push_back(m.second->library);
- delete m.second;
- }
delete rdf_world;
delete lv2_features;
diff --git a/src/server/JackDriver.cpp b/src/server/JackDriver.cpp
index ad68b64d..32dd625f 100644
--- a/src/server/JackDriver.cpp
+++ b/src/server/JackDriver.cpp
@@ -174,7 +174,7 @@ JackDriver::deactivate()
if (_is_activated) {
_flag = true;
_is_activated = false;
- _sem.wait();
+ _sem.timed_wait(1000);
for (auto& p : _ports) {
unregister_port(p);