Reputation: 5189
// locks a critical section, and unlocks it automatically
// when the lock goes out of scope
CAutoLock(CCritSec * plock)
The above is from wxutil.h
, does it lock the access of different process , or just locks different threads in the same process?
Upvotes: 0
Views: 988
Reputation: 523234
Just across threads. From the doc of CAutoLock:
The CAutoLock constructor locks the critical section, ...
and CCritSec:
The CCritSec class provides a thread lock.
More explicitly, from the description of Critical Section Objects:
A critical section object provides synchronization similar to that provided by a mutex object, except that a critical section can be used only by the threads of a single process.
Upvotes: 2