2
0
mirror of https://github.com/boostorg/thread.git synced 2026-01-28 19:52:10 +00:00

Removed semaphores. Fixed some reported bugs. Switched to CRITICAL_SECTION implementations.

[SVN r11501]
This commit is contained in:
William E. Kempf
2001-11-01 16:18:57 +00:00
parent 1f35149ef0
commit f3af804ddb
14 changed files with 36 additions and 583 deletions

View File

@@ -10,7 +10,6 @@
// It is provided "as is" without express or implied warranty.
#include <boost/thread/thread.hpp>
#include <boost/thread/semaphore.hpp>
#include <boost/thread/xtime.hpp>
#include <boost/thread/condition.hpp>
#include <cassert>
@@ -167,8 +166,10 @@ void thread::sleep(const xtime& xt)
// an absolute time.
nanosleep(&ts, 0);
# else
semaphore sema;
sema.down(xt);
mutex mx;
mutex::scoped_lock lock(mx);
condition cond;
cond.timed_wait(lock, xt);
# endif
#endif
}