void FrameworkThread::Stop()
{
	if (!thread_was_started())
		return;

	StopSoon();

	// Wait for the thread to exit.
	Close();

	started_ = false;
	stopping_ = false;
}
示例#2
0
    void Thread::Stop()
    {
        if(!thread_was_started())
        {
            return;
        }

        StopSoon();

        // 等待线程退出.
        //
        // TODO: 很不幸, 我们需要保持message_loop_运行直到线程退出. 有些用户乱用
        // API. 使它们停止.
        Join(thread_);

        // 线程退出时会把message_loop_设置成NULL.
        DCHECK(!message_loop_);

        // 线程不需要再次结束.
        started_ = false;

        stopping_ = false;
    }
示例#3
0
文件: lastfm.cpp 项目: pilkch/library
      void cLastFM::Stop()
      {
        StopSoon();

        WaitToStop();
      }