TiComponent.Unlock
TiComponent See Also
Decreases the LockCount property, allowing other threads to execute when
LockCount reaches 0.
procedure Unlock;
Description
Call Unlock at the end of a critical section begun with a call to the Lock
method.
The paint method for the component will automatically call the Lock method
before painting and call the Unlock method after completing the painting. This
will prevent thread conflicts with the main application thread.
The Lock and Unlock method utilize a critical section API object and must be
paired. Each call to Lock increments the Lock count for the thread and each call
to Unlock decrements the Lock count for the thread.
Example
Delphi
iComponent.Unlock;
C++ Builder
iComponent->Unlock();
Contents | Index | Previous | Next