runnable.h

来自「一个语言识别引擎」· C头文件 代码 · 共 37 行

H
37
字号
// -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*-
#ifndef _ACECHECK_RUNNABLE_
#define _ACECHECK_RUNNABLE_

/**
 * A class that can be managed by a Thread object.
 */
class Runnable {
public:
    virtual ~Runnable() {}

    /**
     * Body to run
     */
    virtual void run() {}


    /**
     * User-defined procedure for stopping execution.  There is no
     * general-purpose way to achieve that.
     */
    virtual void close() {}
  
    /**
     * Called from the creator before the new thread exists
     * and before the associcated Thread::start() call returns
     */
    virtual void beforeStart() {}

    virtual void afterStart(bool success) {}


};

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?