|
Scroom 0.14-48-ga0fee447
|
#include <iostream>#include <memory>#include <boost/date_time/posix_time/posix_time.hpp>#include <boost/thread.hpp>#include <gtest/gtest.h>#include <scroom/async-deleter.hh>#include <scroom/function-additor.hh>#include <scroom/semaphore.hh>#include "helpers.hh"
Classes | |
| class | A |
Functions | |
| static const millisec | short_timeout (250) |
| static const millisec | long_timeout (2000) |
| EXPECT_FALSE (destroyed.P(short_timeout)) | |
| CpuBound () -> schedule(pass(&barrier2)+destroy(a)+clear(&signal)) | |
| a | reset () |
| barrier2 | V () |
| EXPECT_TRUE (signal.P(long_timeout)) | |
| EXPECT_TRUE (destroyed.P(long_timeout)) | |
Variables | |
| Semaphore | destroyed |
| std::shared_ptr< A > | a = std::shared_ptr<A>(new A(&barrier1, &destroyed), AsyncDeleter<A>()) |
| Semaphore | barrier2 |
| Semaphore | signal |
ThreadPool for cpu-bound tasks
This ThreadPool has one thread per core in your system. For CpuBound tasks, this is the optimum. Make sure your tasks do not block or wait for anything.
| EXPECT_FALSE | ( | destroyed. | Pshort_timeout | ) |
| EXPECT_TRUE | ( | destroyed. | Plong_timeout | ) |
| EXPECT_TRUE | ( | signal. | Plong_timeout | ) |
|
static |
| a reset | ( | ) |
|
static |
Referenced by anonymous_namespace{threadpoolimpl.cc}::ThreadList::wait().

| s2 V | ( | ) |
Referenced by Scroom::Bookkeeping::MapBase< K, V >::reReserve(), and Scroom::Bookkeeping::MapBase< K, V >::reserve().

Referenced by Scroom::Utils::areEqual(), intersectsImpliesNonEmptyIntersection(), mix(), operator==(), points_are_close(), and rects_are_close().
| Semaphore barrier2 |