lib/nfs/{FileReader,Glue}: pass EventLoop&
Eliminate dependency on io_thread_get().
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user