FairMQ/test/helper/devices/TestPush.h
2022-08-11 15:30:25 +02:00

36 lines
1.0 KiB
C++

/********************************************************************************
* Copyright (C) 2015-2022 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* *
* This software is distributed under the terms of the *
* GNU Lesser General Public Licence (LGPL) version 3, *
* copied verbatim in the file "LICENSE" *
********************************************************************************/
#ifndef FAIR_MQ_TEST_PUSH_H
#define FAIR_MQ_TEST_PUSH_H
#include <fairmq/Device.h>
#include <thread>
namespace fair::mq::test
{
class Push : public Device
{
protected:
auto InitTask() -> void override
{
std::this_thread::sleep_for(std::chrono::milliseconds(200));
}
auto Run() -> void override
{
auto msg = NewMessage();
Send(msg, "data");
};
};
} // namespace fair::mq::test
#endif /* FAIR_MQ_TEST_PUSH_H */