本文整理汇总了C++中dthread类的典型用法代码示例。如果您正苦于以下问题:C++ dthread类的具体用法?C++ dthread怎么用?C++ dthread使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了dthread类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: start
/// Start the processing threads.
virtual void start()
{
_socket_error = false;
AsyncSocket<f8String>::start();
if (_pipelined)
{
if (_callback_thread.start())
_socket_error = true;
}
}
示例2: start
/// Start the processing threads.
virtual void start()
{
_socket_error = false;
if (_pmodel != pm_coro)
AsyncSocket<f8String>::start();
if (_pmodel == pm_pipeline)
{
if (_callback_thread.start())
_socket_error = true;
}
}
示例3: join
/*! Wait till processing thead has finished.
\return 0 on success */
int join() { return _pmodel == pm_pipeline ? _thread.join() : -1; }
示例4: quit
/// Stop the processing thread and quit.
virtual void quit() { _thread.kill(1); }
示例5: join
/*! Wait till processing thead has finished.
\return 0 on success */
int join() { return _thread.join(); }
示例6: stop
/// Stop the logging thread.
void stop() { _stopping = true; send(std::string()); _thread.join(); }
示例7: kill
/// Kill the logging thread.
void kill() { _thread.kill(0); }
示例8:
/*! Ctor.
\param flags ebitset flags */
Logger(const LogFlags flags) : _thread(ref(*this)), _flags(flags), _ofs(), _lines(), _sequence(), _osequence()
{
_stopping = false;
_thread.start();
}
示例9: start
/// Start the timer thread.
void start() { _thread.start(); }
示例10: join
/// Join timer thread. Wait till exits.
void join() { _thread.join(); }
示例11: kill
/*! Kill timer thread.
\param sig signal to kill with */
void kill(const int sig=SIGKILL) { _thread.kill(sig); }
示例12: join
/*! Wait till processing thead has finished.
\return 0 on success */
int join() { return _pipelined ? _thread.join() : -1; }