Informazio orokorra
Adibideak
Pantailak
Konparazioak
Eskaerak
Download
Documentation
Bazaar
Estatuko eta Laneko Plan
Maiz egiten diren galderak
Idazlea eta Lizentzia
Forums
U++ finantzaketa
Bilatu web honetan
Language
euskara











SourceForge.net Logo



Web gune hau ez da itzuli. Translate da?

 

RWMutex

 

class RWMutex : private NoCopy

This class mediates reader-writer sharing of global data. Only single thread can EnterWrite, but any number of threads can EnterRead.

 

 

Public Method List

 

void EnterWrite()

Blocks until all threads Leave the RWMutex, then enters it and blocks any threads to enter the RWMutex until invoking LeaveWrite().

 


 

void LeaveWrite()

Leaves the RWMutex.

 


 

void EnterRead()

Enter in read mode. More than single thread can enter the RWMutex in read mode. Blocks any threads attempting EnterWrite, until all reader threads leave using LeaveRead.

 


 

void LeaveRead()

Leave the read mode.

 

 

 

 

StaticRWMutex

 

class StaticRWMutex

Variant of RWMutex that can be used as static or global variable without the need of initialization  - it has no constructor and correctly performs the first initialization when any of methods is called. That avoids problems with initialization order or multithreaded initialization issues.

 

 

Public Method List

 

RWMutex& Get()

operator RWMutex&()

Returns the instance of RWMutex.

 


 

void EnterRead()

void LeaveRead()

void EnterWrite()

void LeaveWrite()

Calls respective RWMutex methods.

 

 

 

 

RWMutex::ReadLock

 

class ReadLock

This nested class automates calls to Mutex::EnterRead / Mutex::LeaveRead for block of code using C++ constructor / destructor rules. Using operator StaticRWMutex::RWMutex, it can be used with StaticRWMutex as well.

 

 

Constructor / Destructor detail

 

ReadLock(RWMutex& s)

Calls s.EnterRead().

 


 

~ReadLock()

Calls s.LeaveRead() where s is the constructor parameter.

 

 

 

 

RWMutex::WriteLock

 

class WriteLock

This nested class automates calls to Mutex::EnterWrite / Mutex::LeaveLeave for block of code using C++ constructor / destructor rules. Using operator StaticRWMutex::RWMutex, it can be used with StaticRWMutex as well.

 

 

Constructor / Destructor detail

 

WriteLock(RWMutex& s)

Calls s.EnterWrite().

 


 

~WriteLock()

Calls s.LeaveWrite() where s is the constructor parameter.

 

 

Web gune hau ere english-ez. Lagundu nahi duzu?