Implement Reset signal

This commit is contained in:
Dennis Klein 2019-02-26 17:08:53 +01:00 committed by Dennis Klein
parent 241bf08337
commit ee890a7a46
3 changed files with 7 additions and 2 deletions

View File

@ -54,9 +54,13 @@ auto Context::InitThreadPool(int numberIoThreads) -> void
}
}
Context::~Context()
auto Context::Reset() -> void
{
fIoContext.stop();
}
Context::~Context()
{
for (auto& thread : fThreadPool)
thread.join();
}

View File

@ -69,6 +69,7 @@ class Context
static auto VerifyAddress(const std::string& address) -> Address;
auto Interrupt() -> void { LOG(debug) << "OFI transport: Interrupted (NOOP - not implemented)."; }
auto Resume() -> void { LOG(debug) << "OFI transport: Resumed (NOOP - not implemented)."; }
auto Reset() -> void;
auto MakeReceiveMessage(size_t size) -> MessagePtr;
auto MakeSendMessage(size_t size) -> MessagePtr;

View File

@ -52,7 +52,7 @@ class TransportFactory final : public FairMQTransportFactory
void Interrupt() override { fContext.Interrupt(); }
void Resume() override { fContext.Resume(); }
void Reset() override {}
void Reset() override { fContext.Reset(); }
private:
mutable Context fContext;