mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-26 02:18:04 +01:00
latest changes from main repository
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// Thread_WIN32.h
|
||||
//
|
||||
// $Id: //poco/Main/Foundation/src/Thread_WIN32.cpp#12 $
|
||||
// $Id: //poco/Main/Foundation/src/Thread_WIN32.cpp#13 $
|
||||
//
|
||||
// Library: Foundation
|
||||
// Package: Threading
|
||||
@@ -110,6 +110,22 @@ void ThreadImpl::joinImpl()
|
||||
}
|
||||
|
||||
|
||||
bool ThreadImpl::joinImpl(long milliseconds)
|
||||
{
|
||||
if (!_thread) return true;
|
||||
|
||||
switch (WaitForSingleObject(_thread, milliseconds + 1))
|
||||
{
|
||||
case WAIT_TIMEOUT:
|
||||
return false;
|
||||
case WAIT_OBJECT_0:
|
||||
return true;
|
||||
default:
|
||||
throw SystemException("cannot join thread");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool ThreadImpl::isRunningImpl() const
|
||||
{
|
||||
if (_thread)
|
||||
|
||||
Reference in New Issue
Block a user