Update contrib.
1 // Copyright (C) 2001-2003
4 // Distributed under the Boost Software License, Version 1.0. (See accompanying
5 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 #ifndef BOOST_THREAD_WEK070601_HPP
8 #define BOOST_THREAD_WEK070601_HPP
10 #include <boost/thread/detail/config.hpp>
12 #include <boost/utility.hpp>
13 #include <boost/function.hpp>
14 #include <boost/thread/mutex.hpp>
18 #if defined(BOOST_HAS_PTHREADS)
20 # include <boost/thread/condition.hpp>
21 #elif defined(BOOST_HAS_MPTASKS)
22 # include <Multiprocessing.h>
28 // disable warnings about non dll import
29 // see: http://www.boost.org/more/separate_compilation.html#dlls
31 # pragma warning(push)
32 # pragma warning(disable: 4251 4231 4660 4275)
34 class BOOST_THREAD_DECL thread : private noncopyable
38 explicit thread(const function0<void>& threadfunc);
41 bool operator==(const thread& other) const;
42 bool operator!=(const thread& other) const;
46 static void sleep(const xtime& xt);
50 #if defined(BOOST_HAS_WINTHREADS)
53 #elif defined(BOOST_HAS_PTHREADS)
56 #elif defined(BOOST_HAS_MPTASKS)
57 MPQueueID m_pJoinQueueID;
63 class BOOST_THREAD_DECL thread_group : private noncopyable
69 thread* create_thread(const function0<void>& threadfunc);
70 void add_thread(thread* thrd);
71 void remove_thread(thread* thrd);
76 std::list<thread*> m_threads;
85 // 8 Feb 01 WEKEMPF Initial version.
86 // 1 Jun 01 WEKEMPF Added boost::thread initial implementation.
87 // 3 Jul 01 WEKEMPF Redesigned boost::thread to be noncopyable.
89 #endif // BOOST_THREAD_WEK070601_HPP