lib/nfs/Glue: destruct the NfsManager in the I/O thread

This allows eliminating the indirection code from the NfsConnection
destructor.
This commit is contained in:
Max Kellermann
2014-10-01 20:39:50 +02:00
parent 1b5ec3e3ca
commit 579912e52f
3 changed files with 8 additions and 5 deletions

View File

@@ -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 &