mirror of
https://github.com/pocoproject/poco.git
synced 2025-11-02 05:46:22 +01:00
fixed SF# 2841812: Posix ThreadImpl::sleepImpl throws exceptions on EINTR
This commit is contained in:
@@ -180,23 +180,6 @@ inline int ThreadImpl::getOSPriorityImpl() const
|
||||
}
|
||||
|
||||
|
||||
inline void ThreadImpl::sleepImpl(long milliseconds)
|
||||
{
|
||||
#if defined(__VMS) || defined(__digital__)
|
||||
// This is specific to DECThreads
|
||||
struct timespec interval;
|
||||
interval.tv_sec = milliseconds / 1000;
|
||||
interval.tv_nsec = (milliseconds % 1000)*1000000;
|
||||
pthread_delay_np(&interval);
|
||||
#else
|
||||
struct timeval tv;
|
||||
tv.tv_sec = milliseconds / 1000;
|
||||
tv.tv_usec = (milliseconds % 1000) * 1000;
|
||||
select(0, NULL, NULL, NULL, &tv);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
inline bool ThreadImpl::isRunningImpl() const
|
||||
{
|
||||
return _pData->pRunnableTarget != 0 ||
|
||||
|
||||
Reference in New Issue
Block a user