示例#1
0
    void TriggerCommand() {
        assert(mutex.IsLockedByCurrent());

#ifdef HAVE_POSIX
        cond.Signal();
#else
        command_trigger.Signal();
#endif
    }
示例#2
0
    void TriggerDone() {
        assert(mutex.IsLockedByCurrent());

#ifdef HAVE_POSIX
        cond.Signal();
#else
        done_trigger.Signal();
#endif
    }
示例#3
0
  void TriggerDone() {
    assert(mutex.IsLockedByCurrent());

    cond.signal();
  }
示例#4
0
  void TriggerCommand() {
    assert(mutex.IsLockedByCurrent());

    cond.signal();
  }
示例#5
0
  /**
   * Stop the thread synchronously.
   *
   * Caller must lock the mutex.
   */
  void Stop() {
    assert(mutex.IsLockedByCurrent());

    StopAsync();
    WaitStopped();
  }
示例#6
0
  /**
   * Was the thread asked to stop?  The Tick() implementation should
   * use this to check whether to cancel the operation.
   *
   * Caller must lock the mutex.
   */
  gcc_pure
  bool IsStopped() const {
    assert(mutex.IsLockedByCurrent());

    return stop;
  }
示例#7
0
  /**
   * Is the thread currently working (i.e. inside Tick())?
   *
   * Caller must lock the mutex.
   */
  gcc_pure
  bool IsBusy() const {
    assert(mutex.IsLockedByCurrent());

    return pending || busy;
  }
示例#8
0
  const_iterator end() const {
    assert(mutex.IsLockedByCurrent());

    return const_iterator(nullptr);
  }
示例#9
0
  const_iterator begin() const {
    assert(mutex.IsLockedByCurrent());

    return const_iterator(first);
  }
示例#10
0
  const Serial &GetSerial() const {
    assert(mutex.IsLockedByCurrent());

    return serial;
  }