Поделиться через


CCriticalSection::Unlock

Releases the CCriticalSection object for use by another thread.

BOOL Unlock( );

Возвращаемое значение

Nonzero if the CCriticalSection object was owned by the thread and the release was successful; otherwise 0.

Заметки

If the CCriticalSection is being used stand-alone, Unlock must be called immediately after completing use of the resource controlled by the critical section. If a CSingleLock object is being used, CCriticalSection::Unlock will be called by the lock object's Unlock member function.

Пример

See the example for CCriticalSection::Lock.

Требования

Header: afxmt.h

См. также

Основные понятия

CCriticalSection Class

CCriticalSection Members

Hierarchy Chart