예제 #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;
  }