Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

class Geo::GeoScopedCSection

A simple utility for aquiring a lock for the duration of a function.

Allocate a GeoCriticalSection object in advance then create one of these on the stack to manage the lock/unlock sequence.

Functions

NameDescription
~GeoScopedCSection()

Unlock the critical section given at construction.

GeoScopedCSection(GeoCriticalSection &)

Lock the specified critical section for the duration of this object.


Anchor
ae92813ee45d772d19013a97fe58285e6
ae92813ee45d772d19013a97fe58285e6

Geo::GeoScopedCSection::~GeoScopedCSection

...

public: ~GeoScopedCSection()

...

Unlock the critical section given at construction.


Anchor
a2520bd3d77b0682302587705a8bcf95d
a2520bd3d77b0682302587705a8bcf95d

Geo::GeoScopedCSection::GeoScopedCSection

...

public: GeoScopedCSection
(
    GeoCriticalSection & criticalSection
)

...

Lock the specified critical section for the duration of this object.

It will be unlocked when this object is destructed. The critical section object must remain in scope for the lifetime of this object.