Ticket #6230: 6230_barrier.diff

File 6230_barrier.diff, 1.1 KB (added by viboes, 11 years ago)

barrier use of new exception

  • boost/thread/barrier.hpp

     
    22// David Moore, William E. Kempf
    33// Copyright (C) 2007-8 Anthony Williams
    44//
    5 //  Distributed under the Boost Software License, Version 1.0. (See accompanying 
     5//  Distributed under the Boost Software License, Version 1.0. (See accompanying
    66//  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
    77
    88#ifndef BOOST_BARRIER_JDM030602_HPP
     
    2828            : m_threshold(count), m_count(count), m_generation(0)
    2929        {
    3030            if (count == 0)
    31                 boost::throw_exception(std::invalid_argument("count cannot be zero."));
     31                boost::throw_exception(thread_exception(system::errc::invalid_argument, "barrier constructor: count cannot be zero."));
    3232        }
    33    
     33
    3434        bool wait()
    3535        {
    3636            boost::mutex::scoped_lock lock(m_mutex);
    3737            unsigned int gen = m_generation;
    38        
     38
    3939            if (--m_count == 0)
    4040            {
    4141                m_generation++;