aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/nfs/Glue.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-10-01 20:39:50 +0200
committerMax Kellermann <max@duempel.org>2014-10-01 20:39:50 +0200
commit579912e52f371c07583e09095a5b89bfe88e872a (patch)
tree653abe6d613f364580d6e77e10eb27671a51cf32 /src/lib/nfs/Glue.cxx
parent1b5ec3e3cacea82e7d667e23b6f31811fc37dd49 (diff)
downloadmpd-579912e52f371c07583e09095a5b89bfe88e872a.tar.gz
mpd-579912e52f371c07583e09095a5b89bfe88e872a.tar.xz
mpd-579912e52f371c07583e09095a5b89bfe88e872a.zip
lib/nfs/Glue: destruct the NfsManager in the I/O thread
This allows eliminating the indirection code from the NfsConnection destructor.
Diffstat (limited to 'src/lib/nfs/Glue.cxx')
-rw-r--r--src/lib/nfs/Glue.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/nfs/Glue.cxx b/src/lib/nfs/Glue.cxx
index c89d463ca..6fc849609 100644
--- a/src/lib/nfs/Glue.cxx
+++ b/src/lib/nfs/Glue.cxx
@@ -21,6 +21,7 @@
#include "Glue.hxx"
#include "Manager.hxx"
#include "IOThread.hxx"
+#include "event/Call.hxx"
#include "util/Manual.hxx"
static Manual<NfsManager> nfs_glue;
@@ -43,7 +44,7 @@ nfs_finish()
if (--in_use > 0)
return;
- nfs_glue.Destruct();
+ BlockingCall(io_thread_get(), [](){ nfs_glue.Destruct(); });
}
NfsConnection &