Boost C++ Libraries

PrevUpHomeNext

Struct single_thread_model

boost::log::sources::single_thread_model — Single thread locking model.

Synopsis

// In header: <boost/log/sources/threading_models.hpp>


struct single_thread_model {

  // public member functions
  void lock_shared() const;
  bool try_lock_shared() const;
  template<typename TimeT> bool timed_lock_shared(TimeT const &) const;
  void unlock_shared() const;
  void lock() const;
  bool try_lock() const;
  template<typename TimeT> bool timed_lock(TimeT const &) const;
  void unlock() const;
  void lock_upgrade() const;
  bool try_lock_upgrade() const;
  template<typename TimeT> bool timed_lock_upgrade(TimeT const &) const;
  void unlock_upgrade() const;
  void unlock_upgrade_and_lock() const;
  void unlock_and_lock_upgrade() const;
  void unlock_and_lock_shared() const;
  void unlock_upgrade_and_lock_shared() const;
  void swap(single_thread_model &);
};

Description

single_thread_model public member functions

  1. void lock_shared() const;
  2. bool try_lock_shared() const;
  3. template<typename TimeT> bool timed_lock_shared(TimeT const &) const;
  4. void unlock_shared() const;
  5. void lock() const;
  6. bool try_lock() const;
  7. template<typename TimeT> bool timed_lock(TimeT const &) const;
  8. void unlock() const;
  9. void lock_upgrade() const;
  10. bool try_lock_upgrade() const;
  11. template<typename TimeT> bool timed_lock_upgrade(TimeT const &) const;
  12. void unlock_upgrade() const;
  13. void unlock_upgrade_and_lock() const;
  14. void unlock_and_lock_upgrade() const;
  15. void unlock_and_lock_shared() const;
  16. void unlock_upgrade_and_lock_shared() const;
  17. void swap(single_thread_model &);

PrevUpHomeNext