OSDN Git Service

windows/thread_impl.hpp: release() は復帰値をvoid型に
[roast/roast.git] / 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)