29 #ifndef RCF_DETAIL_POSIX_THREAD_HPP
30 #define RCF_DETAIL_POSIX_THREAD_HPP
32 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
34 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
36 #if defined(BOOST_HAS_PTHREADS)
40 #include <RCF/thread/push_options.hpp>
47 RCF_EXPORT
void* RCF_detail_posix_thread_function(
void* arg);
55 template <
typename Function>
56 posix_thread(Function f)
59 start_thread(
new func<Function>(f));
63 RCF_EXPORT ~posix_thread();
66 RCF_EXPORT
void join();
69 friend void* RCF_detail_posix_thread_function(
void* arg);
74 virtual ~func_base() {}
75 virtual void run() = 0;
78 struct auto_func_base_ptr
81 ~auto_func_base_ptr() {
delete ptr; }
84 template <
typename Function>
103 RCF_EXPORT
void start_thread(func_base* arg);
112 #include <RCF/thread/pop_options.hpp>
114 #endif // defined(BOOST_HAS_PTHREADS)
116 #endif // RCF_DETAIL_POSIX_THREAD_HPP