Develop Biology
The language of life
|
#include <ThreadSafe.h>
Public Member Functions | |
ThreadSafe () | |
ThreadSafe (const ThreadSafe &toCopy) | |
virtual | ~ThreadSafe () |
void | LockThread () const |
void | UnlockThread () const |
ThreadSafe classes are ones that can work with threads. They are meant to be simple and abstract. The actual interface of ThreadSafe methods is c++ version and platform specific. Fortunately, threading was standardized in c++11; however, we do still support c++98 builds. At this time, ThreadSafe methods are only implemented for c++11 and on and on linux systems using c++98 and on. Support for c++98 on other platforms may or may not ever happen.
NOTE: if you do not need threading and don't want to waste time locking & unlocking a single thread all the time, check out Optimize.h (in bio/common), which will let you turn off threading for an extra performance boost.
Definition at line 48 of file ThreadSafe.h.
bio::ThreadSafe::ThreadSafe | ( | ) |
Definition at line 26 of file ThreadSafe.cpp.
bio::ThreadSafe::ThreadSafe | ( | const ThreadSafe & | toCopy | ) |
toCopy |
Definition at line 49 of file ThreadSafe.cpp.
|
virtual |
Definition at line 72 of file ThreadSafe.cpp.
void bio::ThreadSafe::LockThread | ( | ) | const |
uses const_cast to call LockThread().
Definition at line 84 of file ThreadSafe.cpp.
Referenced by bio::physical::Perspective< DIMENSION >::~Perspective(), bio::chemical::UnorderedStructureInterface::Add(), bio::chemical::PeriodicTableImplementation::AssociateType(), bio::physical::Perspective< DIMENSION >::AssociateType(), bio::chemical::UnorderedStructureInterface::Clear(), bio::chemical::PeriodicTableImplementation::DisassociateType(), bio::physical::Perspective< DIMENSION >::DisassociateType(), bio::physical::Perspective< DIMENSION >::Find(), bio::chemical::LinearStructureInterface::ForEach(), bio::chemical::UnorderedStructureInterface::GetAll(), bio::chemical::LinearStructureInterface::GetById(), bio::chemical::LinearStructureInterface::GetByName(), bio::chemical::UnorderedStructureInterface::GetCount(), bio::physical::Perspective< DIMENSION >::GetIdFromName(), bio::chemical::UnorderedStructureInterface::GetNumMatching(), bio::chemical::LinearStructureInterface::GetOrCreateById(), bio::chemical::LinearStructureInterface::GetOrCreateByName(), bio::chemical::PeriodicTableImplementation::GetPropertiesOf(), bio::chemical::UnorderedStructureInterface::GetStringFrom(), bio::chemical::UnorderedStructureInterface::Has(), bio::chemical::UnorderedStructureInterface::HasAll(), bio::chemical::UnorderedStructureInterface::Import(), bio::chemical::UnorderedStructureInterface::ImportAll(), bio::chemical::LinearStructureInterface::Insert(), bio::Threaded::IsRunning(), bio::chemical::PeriodicTableImplementation::RecordPropertiesOf(), bio::chemical::UnorderedStructureInterface::Remove(), bio::Threaded::RequestStop(), bio::Threaded::Start(), bio::Threaded::Stop(), and bio::Threaded::Worker().
void bio::ThreadSafe::UnlockThread | ( | ) | const |
uses const_cast to call UnlockThread().
Definition at line 97 of file ThreadSafe.cpp.
Referenced by bio::physical::Perspective< DIMENSION >::~Perspective(), bio::chemical::UnorderedStructureInterface::Add(), bio::chemical::PeriodicTableImplementation::AssociateType(), bio::physical::Perspective< DIMENSION >::AssociateType(), bio::chemical::UnorderedStructureInterface::Clear(), bio::chemical::PeriodicTableImplementation::DisassociateType(), bio::physical::Perspective< DIMENSION >::DisassociateType(), bio::physical::Perspective< DIMENSION >::Find(), bio::chemical::LinearStructureInterface::ForEach(), bio::chemical::UnorderedStructureInterface::GetAll(), bio::chemical::LinearStructureInterface::GetById(), bio::chemical::LinearStructureInterface::GetByName(), bio::chemical::UnorderedStructureInterface::GetCount(), bio::physical::Perspective< DIMENSION >::GetIdFromName(), bio::chemical::UnorderedStructureInterface::GetNumMatching(), bio::chemical::LinearStructureInterface::GetOrCreateById(), bio::chemical::LinearStructureInterface::GetOrCreateByName(), bio::chemical::PeriodicTableImplementation::GetPropertiesOf(), bio::chemical::UnorderedStructureInterface::GetStringFrom(), bio::chemical::UnorderedStructureInterface::Has(), bio::chemical::UnorderedStructureInterface::HasAll(), bio::chemical::UnorderedStructureInterface::Import(), bio::chemical::UnorderedStructureInterface::ImportAll(), bio::chemical::LinearStructureInterface::Insert(), bio::Threaded::IsRunning(), bio::chemical::PeriodicTableImplementation::RecordPropertiesOf(), bio::chemical::UnorderedStructureInterface::Remove(), bio::Threaded::RequestStop(), bio::Threaded::Start(), bio::Threaded::Stop(), and bio::Threaded::Worker().