Sha256: 1a099200915cdaede674d18e9ea21f122a001dd2f1ba2f5d0b755d2591804e44

Contents?: true

Size: 1.33 KB

Versions: 45

Compression:

Stored size: 1.33 KB

Contents

// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// (C) Copyright 2009-2012 Anthony Williams
// (C) Copyright 2012 Vicente J. Botet Escriba

// Based on the Anthony's idea of scoped_thread in CCiA

#ifndef BOOST_THREAD_THREAD_FUNCTORS_HPP
#define BOOST_THREAD_THREAD_FUNCTORS_HPP

#include <boost/thread/detail/config.hpp>
#include <boost/thread/detail/delete.hpp>
#include <boost/thread/detail/move.hpp>
#include <boost/thread/thread_only.hpp>

#include <boost/config/abi_prefix.hpp>

namespace boost
{

  struct detach
  {
    template <class Thread>
    void operator()(Thread& t)
    {
      t.detach();
    }
  };

  struct detach_if_joinable
  {
    template <class Thread>
    void operator()(Thread& t)
    {
      if (t.joinable())
      {
        t.detach();
      }
    }
  };

  struct join_if_joinable
  {
    template <class Thread>
    void operator()(Thread& t)
    {
      if (t.joinable())
      {
        t.join();
      }
    }
  };

#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
  struct interrupt_and_join_if_joinable
  {
    template <class Thread>
    void operator()(Thread& t)
    {
      if (t.joinable())
      {
        t.interrupt();
        t.join();
      }
    }
  };
#endif
}
#include <boost/config/abi_suffix.hpp>

#endif

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
passenger-6.0.26 src/cxx_supportlib/vendor-modified/boost/thread/thread_functors.hpp
passenger-6.0.25 src/cxx_supportlib/vendor-modified/boost/thread/thread_functors.hpp
passenger-6.0.24 src/cxx_supportlib/vendor-modified/boost/thread/thread_functors.hpp
passenger-6.0.23 src/cxx_supportlib/vendor-modified/boost/thread/thread_functors.hpp
passenger-6.0.20 src/cxx_supportlib/vendor-modified/boost/thread/thread_functors.hpp
passenger-6.0.19 src/cxx_supportlib/vendor-modified/boost/thread/thread_functors.hpp
passenger-6.0.18 src/cxx_supportlib/vendor-modified/boost/thread/thread_functors.hpp
passenger-6.0.17 src/cxx_supportlib/vendor-modified/boost/thread/thread_functors.hpp
passenger-6.0.16 src/cxx_supportlib/vendor-modified/boost/thread/thread_functors.hpp
passenger-6.0.15 src/cxx_supportlib/vendor-modified/boost/thread/thread_functors.hpp
passenger-6.0.14 src/cxx_supportlib/vendor-modified/boost/thread/thread_functors.hpp
passenger-6.0.13 src/cxx_supportlib/vendor-modified/boost/thread/thread_functors.hpp
passenger-6.0.12 src/cxx_supportlib/vendor-modified/boost/thread/thread_functors.hpp
passenger-6.0.11 src/cxx_supportlib/vendor-modified/boost/thread/thread_functors.hpp
passenger-6.0.10 src/cxx_supportlib/vendor-modified/boost/thread/thread_functors.hpp
passenger-6.0.9 src/cxx_supportlib/vendor-modified/boost/thread/thread_functors.hpp
passenger-6.0.8 src/cxx_supportlib/vendor-modified/boost/thread/thread_functors.hpp
passenger-6.0.7 src/cxx_supportlib/vendor-modified/boost/thread/thread_functors.hpp
passenger-6.0.6 src/cxx_supportlib/vendor-modified/boost/thread/thread_functors.hpp
passenger-6.0.5 src/cxx_supportlib/vendor-modified/boost/thread/thread_functors.hpp