Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for a snapshot of the master branch, built from commit 6e3b727776.
PrevUpHomeNext

Class null_mutex

boost::interprocess::null_mutex

Synopsis

// In header: <boost/interprocess/sync/null_mutex.hpp>


class null_mutex {
public:
  // construct/copy/destruct
  null_mutex() noexcept;
  ~null_mutex();

  // public member functions
  void lock();
  bool try_lock();
  template<typename TimePoint> bool timed_lock(const TimePoint &);
  template<typename TimePoint> bool try_lock_until(const TimePoint &);
  template<typename Duration> bool try_lock_for(const Duration &);
  void unlock();
  void lock_sharable();
  void lock_shared();
  bool try_lock_sharable();
  bool try_lock_shared();
  template<typename TimePoint> bool timed_lock_sharable(const TimePoint &);
  void unlock_sharable();
  void unlock_shared();
  void lock_upgradable();
  bool try_lock_upgradable();
  template<typename TimePoint> bool timed_lock_upgradable(const TimePoint &);
  void unlock_upgradable();
  void unlock_and_lock_upgradable();
  void unlock_and_lock_sharable();
  void unlock_upgradable_and_lock_sharable();
  void unlock_upgradable_and_lock();
  bool try_unlock_upgradable_and_lock();
  template<typename TimePoint> 
    bool timed_unlock_upgradable_and_lock(const TimePoint &);
  bool try_unlock_sharable_and_lock();
  bool try_unlock_sharable_and_lock_upgradable();
};

Description

Implements a mutex that simulates a mutex without doing any operation and simulates a successful operation.

null_mutex public construct/copy/destruct

  1. null_mutex() noexcept;

    Constructor. Empty.

  2. ~null_mutex();

    Destructor. Empty.

null_mutex public member functions

  1. void lock();
    Simulates a mutex lock() operation. Empty function.
  2. bool try_lock();

    Simulates a mutex try_lock() operation. Equivalent to "return true;"

  3. template<typename TimePoint> bool timed_lock(const TimePoint &);

    Simulates a mutex timed_lock() operation. Equivalent to "return true;"

  4. template<typename TimePoint> bool try_lock_until(const TimePoint &);

    Same as timed_lock, but this function is modeled after the standard library interface.

  5. template<typename Duration> bool try_lock_for(const Duration &);

    Same as timed_lock, but this function is modeled after the standard library interface.

  6. void unlock();

    Simulates a mutex unlock() operation. Empty function.

  7. void lock_sharable();

    Simulates a mutex lock_sharable() operation. Empty function.

  8. void lock_shared();

    Same as lock_sharable but with a std-compatible interface

  9. bool try_lock_sharable();

    Simulates a mutex try_lock_sharable() operation. Equivalent to "return true;"

  10. bool try_lock_shared();

    Same as try_lock_sharable but with a std-compatible interface

  11. template<typename TimePoint> bool timed_lock_sharable(const TimePoint &);

    Simulates a mutex timed_lock_sharable() operation. Equivalent to "return true;"

  12. void unlock_sharable();

    Simulates a mutex unlock_sharable() operation. Empty function.

  13. void unlock_shared();

    Same as unlock_sharable but with a std-compatible interface

  14. void lock_upgradable();

    Simulates a mutex lock_upgradable() operation. Empty function.

  15. bool try_lock_upgradable();

    Simulates a mutex try_lock_upgradable() operation. Equivalent to "return true;"

  16. template<typename TimePoint> bool timed_lock_upgradable(const TimePoint &);

    Simulates a mutex timed_lock_upgradable() operation. Equivalent to "return true;"

  17. void unlock_upgradable();

    Simulates a mutex unlock_upgradable() operation. Empty function.

  18. void unlock_and_lock_upgradable();

    Simulates unlock_and_lock_upgradable(). Empty function.

  19. void unlock_and_lock_sharable();

    Simulates unlock_and_lock_sharable(). Empty function.

  20. void unlock_upgradable_and_lock_sharable();

    Simulates unlock_upgradable_and_lock_sharable(). Empty function.

  21. void unlock_upgradable_and_lock();

    Simulates unlock_upgradable_and_lock(). Empty function.

  22. bool try_unlock_upgradable_and_lock();

    Simulates try_unlock_upgradable_and_lock(). Equivalent to "return true;"

  23. template<typename TimePoint> 
      bool timed_unlock_upgradable_and_lock(const TimePoint &);

    Simulates timed_unlock_upgradable_and_lock(). Equivalent to "return true;"

  24. bool try_unlock_sharable_and_lock();

    Simulates try_unlock_sharable_and_lock(). Equivalent to "return true;"

  25. bool try_unlock_sharable_and_lock_upgradable();

    Simulates try_unlock_sharable_and_lock_upgradable(). Equivalent to "return true;"


PrevUpHomeNext