29 #ifndef RCF_DETAIL_WIN_THREAD_HPP
30 #define RCF_DETAIL_WIN_THREAD_HPP
32 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
34 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
36 #if defined(BOOST_WINDOWS) && !defined(UNDER_CE)
38 #include <RCF/thread/push_options.hpp>
43 RCF_EXPORT
unsigned int __stdcall win_thread_function(
void* arg);
45 class RCF_EXPORT win_thread
51 template <
typename Function>
52 win_thread(Function f,
unsigned int stack_size = 0)
56 start_thread(
new func<Function>(f), stack_size);
66 friend RCF_EXPORT
unsigned int __stdcall win_thread_function(
void* arg);
71 virtual ~func_base() {}
72 virtual void run() = 0;
73 ::HANDLE entry_event_;
77 struct auto_func_base_ptr
80 ~auto_func_base_ptr() {
delete ptr; }
83 template <
typename Function>
102 void start_thread(func_base* arg,
unsigned int stack_size);
105 ::HANDLE exit_event_;
111 #include <RCF/thread/pop_options.hpp>
113 #endif // defined(BOOST_WINDOWS) && !defined(UNDER_CE)
115 #endif // RCF_DETAIL_WIN_THREAD_HPP