lib/nfs/{FileReader,Glue}: pass EventLoop&

Eliminate dependency on io_thread_get().
This commit is contained in:
Max Kellermann
2017-01-25 22:58:13 +01:00
parent 4140e9b857
commit 611ce6e756
7 changed files with 17 additions and 13 deletions

View File

@@ -23,7 +23,6 @@
#include "Base.hxx"
#include "Connection.hxx"
#include "event/Call.hxx"
#include "IOThread.hxx"
#include "util/StringCompare.hxx"
#include <utility>
@@ -33,8 +32,8 @@
#include <fcntl.h>
#include <sys/stat.h>
NfsFileReader::NfsFileReader()
:DeferredMonitor(io_thread_get()), state(State::INITIAL)
NfsFileReader::NfsFileReader(EventLoop &event_loop)
:DeferredMonitor(event_loop), state(State::INITIAL)
{
}
@@ -86,7 +85,7 @@ NfsFileReader::CancelOrClose()
void
NfsFileReader::DeferClose()
{
BlockingCall(io_thread_get(), [this](){ Close(); });
BlockingCall(GetEventLoop(), [this](){ Close(); });
}
void