|
Scroom 0.14-48-ga0fee447
|
#include <boost/date_time/posix_time/posix_time.hpp>#include <boost/thread.hpp>#include <gtest/gtest.h>#include <scroom/function-additor.hh>#include <scroom/semaphore.hh>#include "helpers.hh"
Functions | |
| static const millisec | short_timeout (250) |
| static const millisec | long_timeout (2000) |
| ASSERT_FALSE (s.try_P()) | |
| ASSERT_TRUE (s.try_P()) | |
| std::weak_ptr< int > const | w (p) |
| ASSERT_TRUE (w.lock()) | |
| boost::function< void()> const | f (destroy(p)) |
| p | reset () |
| f () | |
| ASSERT_FALSE (w.lock()) | |
| ASSERT_FALSE (s1.try_P()) | |
| ASSERT_FALSE (s2.try_P()) | |
| clear s1 clear | s2 () |
| ASSERT_TRUE (s1.try_P()) | |
| ASSERT_TRUE (s2.try_P()) | |
| EXPECT_FALSE (s1.try_P()) | |
| EXPECT_FALSE (s2.try_P()) | |
| boost::thread | t (pass(&s1)+clear(&s2)) |
| EXPECT_FALSE (s2.P(short_timeout)) | |
| s1 | V () |
| EXPECT_TRUE (s2.P(long_timeout)) | |
| EXPECT_TRUE (t.timed_join(long_timeout)) | |
| EXPECT_EQ & | a (a+clear(&s2)) |
| boost::thread | t (a) |
| EXPECT_EQ & | a (pass(&s1)+a) |
| Semaphore | s2 (25) |
| () | void (clear(nullptr)+(5 *clear(nullptr)) *5) |
| () | void (clear(nullptr)+5 *(5 *clear(nullptr))) |
| () | void (4 *(clear(nullptr)+clear(nullptr))) |
| () | void ((clear(nullptr)+clear(nullptr)) *4) |
Variables | |
| clear(&) | s () |
| Semaphore | s2 (0) |
| Semaphore | s1 (0) |
| a = pass(&s1) | |
| ASSERT_FALSE | ( | s. | try_P() | ) |
| ASSERT_FALSE | ( | s1. | try_P() | ) |
| ASSERT_FALSE | ( | w. | lock() | ) |
| ASSERT_TRUE | ( | s. | try_P() | ) |
| ASSERT_TRUE | ( | s1. | try_P() | ) |
| ASSERT_TRUE | ( | s2. | try_P() | ) |
| ASSERT_TRUE | ( | w. | lock() | ) |
| EXPECT_FALSE | ( | s1. | try_P() | ) |
| EXPECT_FALSE | ( | s2. | Pshort_timeout | ) |
| EXPECT_FALSE | ( | s2. | try_P() | ) |
| EXPECT_TRUE | ( | s2. | Plong_timeout | ) |
| EXPECT_TRUE | ( | t. | timed_joinlong_timeout | ) |
| f | ( | ) |
Referenced by Scroom::GtkHelpers::async_on_ui_thread(), Scroom::GtkHelpers::async_on_ui_thread_and_wait(), combinedFileFilter(), destroyGtkFileFilterList(), filterMatchesInfo(), Scroom::TiledBitmap::LayerSpecForBitmapper::get(), Scroom::ColormapImpl::Colormaps::load(), View::on_buttonPress(), View::on_buttonRelease(), Scroom::Utils::on_destruction(), View::on_motion_notify(), on_open_activate(), Scroom::Detail::ThreadPool::FunctionAdditor::operator()(), Scroom::Detail::ThreadPool::FunctionMultiplier::operator()(), GtkFileFilterInfoDeleter::operator()(), operator*(), operator*(), Scroom::TiledBitmap::LayerSpecForBitmapper::registerFunction(), ThreadPool::schedule(), ThreadPool::schedule(), Scroom::GtkHelpers::sync_on_ui_thread(), Scroom::GtkHelpers::wrap(), and GtkFileFilterListDestroyer::~GtkFileFilterListDestroyer().

|
static |
| p reset | ( | ) |
| Semaphore s2 | ( | 25 | ) |
|
static |
| boost::thread t | ( | a | ) |
| s1 V | ( | ) |
| () void | ( | 4 * | clear(nullptr)+clear(nullptr) | ) |
Referenced by Scroom::GtkHelpers::async_on_ui_thread_and_wait(), and TileViewState::process().

| std::weak_ptr< int > const w | ( | p | ) |
| pass(&) s() | ( | ) |
| Scaffold s1 | ( | 0 | ) |