Ignore:
Timestamp:
Feb 27, 2024, 10:18:17 PM (20 months ago)
Author:
Frederik Heber <frederik.heber@…>
Branches:
Candidate_v1.7.0, stable
Children:
399c69
Parents:
d203d1e
git-author:
Frederik Heber <frederik.heber@…> (02/25/24 23:14:04)
git-committer:
Frederik Heber <frederik.heber@…> (02/27/24 22:18:17)
Message:

FIX: ActionQueue no locked on CurrentAction access.

  • actionqueue[CurrentAction] without mutex locking.
  • getCurrentAction() without mutex locking.
  • extracted stepOnToNextAction().
  • using recursive_mutex instead of normal to allow nested locks.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Actions/ActionQueue.hpp

    rd203d1e r0427d1  
    2121#ifdef HAVE_ACTION_THREAD
    2222#include <boost/thread.hpp>
     23#include <boost/thread/recursive_mutex.hpp>
    2324#endif
    2425#include <vector>
     
    263264  { return run_thread; }
    264265
     266  /**
     267   * Steps on to the next action by incrementing \a CurrentAction.
     268   */
     269  void stepOnToNextAction();
     270
    265271  /** Clears the temporary queue.
    266272   *
     
    362368
    363369  //!> internal mutex to synchronize access to queue
    364   mutable boost::mutex mtx_queue;
     370  mutable boost::recursive_mutex mtx_queue;
    365371
    366372  //!> conditional variable notifying when run_thread is idling
Note: See TracChangeset for help on using the changeset viewer.