diff options
author | Willem Jan Palenstijn <wjp@usecode.org> | 2015-02-25 16:37:36 +0100 |
---|---|---|
committer | Willem Jan Palenstijn <wjp@usecode.org> | 2015-02-25 16:37:36 +0100 |
commit | 214a5429db07e3e18af5856e164f850fbabca427 (patch) | |
tree | b9c72b87a1ad931c11153462206afb0464c85d12 /src | |
parent | f619aba4543de6b9a4fe6fb63b6f1840ef509846 (diff) | |
parent | 9a60acfc18e72b8aacdc7388617443e9854f4d3b (diff) | |
download | astra-214a5429db07e3e18af5856e164f850fbabca427.tar.gz astra-214a5429db07e3e18af5856e164f850fbabca427.tar.bz2 astra-214a5429db07e3e18af5856e164f850fbabca427.tar.xz astra-214a5429db07e3e18af5856e164f850fbabca427.zip |
Merge pull request #19 from wjp/osx-support
Improve support for OS X
Diffstat (limited to 'src')
-rw-r--r-- | src/AsyncAlgorithm.cpp | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/src/AsyncAlgorithm.cpp b/src/AsyncAlgorithm.cpp index fcc4dcb..b265f59 100644 --- a/src/AsyncAlgorithm.cpp +++ b/src/AsyncAlgorithm.cpp @@ -160,32 +160,6 @@ void CAsyncAlgorithm::runWrapped(int _iNrIterations) m_bDone = true; } -void CAsyncAlgorithm::timedJoin(int _milliseconds) -{ -#ifndef USE_PTHREADS - if (m_pThread) { - boost::posix_time::milliseconds rel(_milliseconds); - bool res = m_pThread->timed_join(rel); - if (res) { - delete m_pThread; - m_pThread = 0; - m_bThreadStarted = false; - } - } -#else - if (m_bThreadStarted) { - struct timespec abstime; - clock_gettime(CLOCK_REALTIME, &abstime); - abstime.tv_sec += _milliseconds / 1000; - abstime.tv_nsec += (_milliseconds % 1000) * 1000000L; - int err = pthread_timedjoin_np(m_thread, 0, &abstime); - if (err == 0) { - m_bThreadStarted = false; - } - } -#endif -} - void CAsyncAlgorithm::signalAbort() { if (m_pAlg) |