Ticket #12620: lock_types.patch

File lock_types.patch, 545 bytes (added by Alexandre Pereira Nunes <alexandre.nunes@…>, 6 years ago)
  • lock_types.hpp

    old new namespace boost  
    445445      }
    446446      if (!owns_lock())
    447447      {
     448#if defined BOOST_THREAD_THROW_IF_PRECONDITION_NOT_SATISFIED
    448449        boost::throw_exception(
    449450            boost::lock_error(static_cast<int>(system::errc::operation_not_permitted), "boost unique_lock doesn't own the mutex"));
     451#endif
     452      }
     453       else
     454      {
     455        m->unlock();
    450456      }
    451       m->unlock();
    452457      is_locked = false;
    453458    }
    454459