diff --git a/include/faabric/scheduler/Scheduler.h b/include/faabric/scheduler/Scheduler.h index efd8ef142..db3f0f706 100644 --- a/include/faabric/scheduler/Scheduler.h +++ b/include/faabric/scheduler/Scheduler.h @@ -171,40 +171,6 @@ class FunctionMigrationThread : public faabric::util::PeriodicBackgroundThread void doWork() override; }; -/** - * A promise for a future message result with an associated eventfd for use with - * asio. - */ -class MessageLocalResult final -{ - public: - std::promise> promise; - int eventFd = -1; - - MessageLocalResult(); - - MessageLocalResult(const MessageLocalResult&) = delete; - - inline MessageLocalResult(MessageLocalResult&& other) - { - this->operator=(std::move(other)); - } - - MessageLocalResult& operator=(const MessageLocalResult&) = delete; - - inline MessageLocalResult& operator=(MessageLocalResult&& other) - { - this->promise = std::move(other.promise); - this->eventFd = other.eventFd; - other.eventFd = -1; - return *this; - } - - ~MessageLocalResult(); - - void setValue(std::unique_ptr&& msg); -}; - /** * Background thread that periodically checks to see if any executors have * become stale (i.e. not handled any requests in a given timeout). If any are diff --git a/src/scheduler/Scheduler.cpp b/src/scheduler/Scheduler.cpp index 8a563241c..db65f5a4b 100644 --- a/src/scheduler/Scheduler.cpp +++ b/src/scheduler/Scheduler.cpp @@ -52,24 +52,6 @@ static faabric::util:: ConcurrentMap> plannerClient; -MessageLocalResult::MessageLocalResult() -{ - eventFd = eventfd(0, EFD_CLOEXEC); -} - -MessageLocalResult::~MessageLocalResult() -{ - if (eventFd >= 0) { - close(eventFd); - } -} - -void MessageLocalResult::setValue(std::unique_ptr&& msg) -{ - this->promise.set_value(std::move(msg)); - eventfd_write(this->eventFd, (eventfd_t)1); -} - Scheduler& getScheduler() { static Scheduler sch;