OSDN Git Service

windows/thread_impl.hpp: release() は復帰値をvoid型に
authormyun2 <myun2@nwhite.info>
Thu, 12 Jul 2012 06:45:18 +0000 (15:45 +0900)
committermyun2 <myun2@nwhite.info>
Thu, 12 Jul 2012 06:45:18 +0000 (15:45 +0900)
roast/include/roast/windows/thread_impl.hpp

index 177e7b9..3b09e43 100644 (file)
@@ -55,9 +55,11 @@ namespace roast
                                                &m_dwId );
                        }
                        
-                       bool release(thread_handle_t h)
+                       void release(thread_handle_t h)
                        {
-                               return ( ::CloseHandle((HANDLE)h) == TRUE ? true : false );
+                               //return ( ::CloseHandle((HANDLE)h) == TRUE ? true : false );
+                               if ( ::CloseHandle(h) != TRUE )
+                                       throw thread_exception("windows::thread_impl::close(): ::CloseHandle() was failed.");
                        }
                        
                        bool join(thread_handle_t h, unsigned int timeout_ms)