nn::nex::CriticalSection Class

Syntax

class CriticalSection : public nn::nex::RootObject

Description

Critical section class.

When a game utilizes multiple threads, certain sections of code normally need to be protected. Allowing access by only one thread at a time ensures that the code is correctly executed. One of the easiest ways to do this is by using the CriticalSection class. This class guarantees that no system state changes will occur for the duration of calls to the Enter and Leave functions. You can use the ScopedCS class to avoid accidentally permanently locking a CriticalSection. For details, see the function reference pages for the class.

Member Functions

CriticalSection Constructor.
V ~CriticalSection Destructor.
Enter Enters a critical section.
Leave Leaves a critical section.

Class Hierarchy

nn::nex::RootObject
  nn::nex::CriticalSection

See Also

ScopedCS

Revision History

2011/01/27
Initial version.

CONFIDENTIAL