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

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

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

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

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

    StopAsync();
    WaitStopped();
  }
Exemple #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;
  }
Exemple #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;
  }
Exemple #8
0
  const_iterator end() const {
    assert(mutex.IsLockedByCurrent());

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

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

    return serial;
  }