• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // A model of the Lockable concept from Boost.Thread which
2 // does nothing.  It can be passed as the Mutex template parameter
3 // for a signal, if the user wishes to disable thread-safety
4 // (presumably for performance reasons).
5 
6 // Copyright Frank Mori Hess 2008.
7 // Distributed under the Boost Software License, Version
8 // 1.0. (See accompanying file LICENSE_1_0.txt or copy at
9 // http://www.boost.org/LICENSE_1_0.txt)
10 
11 // See http://www.boost.org/libs/signals2 for library home page.
12 
13 #ifndef BOOST_SIGNALS2_DUMMY_MUTEX_HPP
14 #define BOOST_SIGNALS2_DUMMY_MUTEX_HPP
15 
16 namespace boost {
17   namespace signals2 {
18     class dummy_mutex
19     {
20     public:
lock()21       void lock() {}
try_lock()22       bool try_lock() {return true;}
unlock()23       void unlock() {}
24     };
25   } // end namespace signals2
26 } // end namespace boost
27 
28 #endif // BOOST_SIGNALS2_DUMMY_MUTEX_HPP
29