RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TMutex Class

TMutex is a synchronization primitive used to guard a shared resource.

Pascal
TMutex = class(THandleObject);
C++
class TMutex : public THandleObject;

Use TMutex to synchronize two or more threads and allow them to safely access a shared resource. A mutex creates a queue of threads that are waiting on a resource and allows only one thread to access that resource at any given moment.  

A mutex is basically equivalent to a binary semaphore. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!