Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Classes | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
Smooth.Slinq.Context.BacktrackDetector Struct Reference

Used to find backtracking Slinq usage. More...

Public Member Functions

void DetectBacktrack ()
 
void Release ()
 
void TryReleaseShared ()
 

Static Public Member Functions

static BacktrackDetector ()
 
static BacktrackDetector Borrow ()
 

Static Public Attributes

static readonly bool enabled
 

Detailed Description

Used to find backtracking Slinq usage.

If DETECT_BACKTRACK is defined, backtrack detectors will lock a reference context and test the backtrack state on every Slinq operation. This will severely reduce performance and should only be used for debugging purposes.

If DETECT_BACKTRACK is not defined, detection operations will not be compiled into the application.

Note: Backtrack detection does not work reliably across multiple threads. If pooled objects are shared or passed between threads, external locking and/or ownership management is the repsonsibility of the user.

Constructor & Destructor Documentation

static Smooth.Slinq.Context.BacktrackDetector.BacktrackDetector ( )
inlinestatic

Member Function Documentation

static BacktrackDetector Smooth.Slinq.Context.BacktrackDetector.Borrow ( )
inlinestatic
void Smooth.Slinq.Context.BacktrackDetector.DetectBacktrack ( )
inline
void Smooth.Slinq.Context.BacktrackDetector.Release ( )
inline
void Smooth.Slinq.Context.BacktrackDetector.TryReleaseShared ( )
inline

Member Data Documentation

readonly bool Smooth.Slinq.Context.BacktrackDetector.enabled
static

The documentation for this struct was generated from the following file: