libosmscout 1.1.1
Loading...
Searching...
No Matches
osmscout::Latch Class Reference

#include <libosmscout/include/osmscout/async/ReadWriteLock.h>

Public Member Functions

 Latch ()
 Latch (bool _px)
 Latch (const Latch &)=delete
 Latch (Latch &&)=delete
Latchoperator= (const Latch &)=delete
Latchoperator= (Latch &&)=delete
 ~Latch ()
void lock ()
void unlock ()
void lock_shared ()
void unlock_shared ()
bool try_lock_shared ()

Detailed Description

This implements a pure C++ Latch providing lock-S (shared) and lock-X (exclusive). The concept used here allows X requests to be prioritized faster and more smoothly than standard implementations. It uses a no-lock strategy whenever possible and reverts to lock and wait in race condition.

Constructor & Destructor Documentation

◆ Latch() [1/4]

osmscout::Latch::Latch ( )

◆ Latch() [2/4]

osmscout::Latch::Latch ( bool _px)
inlineexplicit

◆ Latch() [3/4]

osmscout::Latch::Latch ( const Latch & )
delete

◆ Latch() [4/4]

osmscout::Latch::Latch ( Latch && )
delete

◆ ~Latch()

osmscout::Latch::~Latch ( )

Member Function Documentation

◆ lock()

void osmscout::Latch::lock ( )

◆ lock_shared()

void osmscout::Latch::lock_shared ( )

◆ operator=() [1/2]

Latch & osmscout::Latch::operator= ( const Latch & )
delete

◆ operator=() [2/2]

Latch & osmscout::Latch::operator= ( Latch && )
delete

◆ try_lock_shared()

bool osmscout::Latch::try_lock_shared ( )

◆ unlock()

void osmscout::Latch::unlock ( )

◆ unlock_shared()

void osmscout::Latch::unlock_shared ( )

The documentation for this class was generated from the following file: