OSDN Git Service

通りまっせ
authormyun2 <myun2@nwhite.info>
Sun, 9 Sep 2012 11:39:59 +0000 (20:39 +0900)
committermyun2 <myun2@nwhite.info>
Sun, 9 Sep 2012 11:40:18 +0000 (20:40 +0900)
roast/include/roast/parallel/thread/thread.hpp
roast/test/thread_test/thread_test.cpp

index 8eddbc4..c9e9b0b 100644 (file)
@@ -47,7 +47,9 @@ namespace roast
                template <typename _Func>
                thread_(_Func func)
                {
-                       thread_(func, NULL);
+                       m_handle = _Impl::invalid_handle;
+                       if ( start(func) != true )
+                               thread_exception("thread start failed.");
                }
 
                template <typename _Func, typename _Param>
index 1d07598..9828780 100644 (file)
@@ -10,5 +10,6 @@ int func(int)
 int main()
 {
        roast::thread th(func);
+       Sleep(10);
        return 0;
 }