aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/nfs/Connection.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/Connection.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/Connection.cxx')
-rw-r--r--src/lib/nfs/Connection.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/nfs/Connection.cxx b/src/lib/nfs/Connection.cxx
index 13f7cd89c..934cf0a49 100644
--- a/src/lib/nfs/Connection.cxx
+++ b/src/lib/nfs/Connection.cxx
@@ -22,9 +22,9 @@
#include "Lease.hxx"
#include "Domain.hxx"
#include "Callback.hxx"
+#include "event/Loop.hxx"
#include "system/fd_util.h"
#include "util/Error.hxx"
-#include "event/Call.hxx"
extern "C" {
#include <nfsc/libnfs.h>
@@ -123,14 +123,13 @@ events_to_libnfs(unsigned i)
NfsConnection::~NfsConnection()
{
+ assert(SocketMonitor::GetEventLoop().IsInside());
assert(new_leases.empty());
assert(active_leases.empty());
assert(callbacks.IsEmpty());
if (context != nullptr)
- BlockingCall(SocketMonitor::GetEventLoop(), [this](){
- DestroyContext();
- });
+ DestroyContext();
}
void