YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
Terminator.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-FileCopyrightText: 2006-2010 RobotCub Consortium
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef YARP_OS_TERMINATOR_H
8#define YARP_OS_TERMINATOR_H
9
10
11#include <yarp/os/Thread.h>
12
13namespace yarp::os {
14
31{
32public:
39 static bool terminateByName(const char* name);
40};
41
47{
48protected:
50 volatile bool quit;
51 volatile bool ok;
52
53public:
58 Terminee(const char* name);
59
63 virtual ~Terminee();
64
65
66 void run() override;
67
72 bool waitQuit() const;
73
79 bool mustQuit() const;
80
85 bool isOk() const;
86
87 void onStop() override;
88};
89
90} // namespace yarp::os
91
92#endif // YARP_OS_TERMINATOR_H
Send a message to a process that has a corresponding socket port created using the Terminee class to ...
Definition Terminator.h:31
A class that can be polled to see whether the process has been asked to quit gracefully.
Definition Terminator.h:47
volatile bool ok
Definition Terminator.h:51
volatile bool quit
Definition Terminator.h:50
An abstraction for a thread of execution.
Definition Thread.h:21
An interface to the operating system, including Port based communication.
#define YARP_os_API
Definition api.h:18