• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (C) 2010 Vicente Botet
2 //
3 //  Distributed under the Boost Software License, Version 1.0. (See accompanying
4 //  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5 
6 #include <boost/thread/shared_mutex.hpp>
7 #include <boost/thread/locks.hpp>
8 
main()9 int main() {
10 
11     boost::shared_mutex mtx; boost::upgrade_lock<boost::shared_mutex> lk(mtx);
12 
13     boost::upgrade_to_unique_lock<boost::shared_mutex> lk2(lk);
14 
15     return 0;
16 }
17