runnable.h
来自「一个语言识别引擎」· C头文件 代码 · 共 54 行
H
54 行
// -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*-
/*
* Copyright (C) 2006 Paul Fitzpatrick
* CopyPolicy: Released under the terms of the GNU GPL v2.0.
*
*/
#ifndef _YARP2_OS_RUNNABLE_
#define _YARP2_OS_RUNNABLE_
namespace yarp {
namespace os {
class Runnable;
}
}
/**
* A class that can be managed by another thread.
*/
class yarp::os::Runnable {
public:
virtual ~Runnable() {}
/**
* Body to run - could be periodic or continuous
*/
virtual void run() {}
/**
* User-defined procedure for stopping execution. There is no
* general-purpose way to achieve that.
*/
virtual void close() {}
/**
* Should be called from the creator *before* the thread exists
* and before a call that requested the thread returns
*/
virtual void beforeStart() {}
/**
* Should be called from the creator *after* the thread exists
* and before a call that requested the thread returns
*/
virtual void afterStart(bool success) {}
};
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?