Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Static Public Member Functions | List of all members
Smooth.Dispose.DisposalQueue Class Reference

Queues pooled resources for cleanup by a background thread. More...

Static Public Member Functions

static void Enqueue (IDisposable item)
 Adds the specified item to the disposal queue. More...
 
static void Pulse ()
 Pulses the queue lock, potentially waking up the disposal thread. More...
 

Detailed Description

Queues pooled resources for cleanup by a background thread.

By default, the disposal thread is woken up at the end of LateUpdate, when there is likely to be free CPU time available while GPU operations are in progress.

Various pools may be locked and unlocked while resources are released, potentially causing contention if pooled resources are borrowed during the disposal process.

Advanced users who are using pools from the main thread during the rendering phase may want to customize the point in the Unity event loop when the queue lock is pulsed, potentially pulsing from a Camera event.

Member Function Documentation

static void Smooth.Dispose.DisposalQueue.Enqueue ( IDisposable  item)
inlinestatic

Adds the specified item to the disposal queue.

static void Smooth.Dispose.DisposalQueue.Pulse ( )
inlinestatic

Pulses the queue lock, potentially waking up the disposal thread.


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