Space Engineers
Public Member Functions | List of all members
VRageRender.MyMessagePool Class Reference

TODO: This should use some better sync, it could introduce delays with current state 1) Use spin lock 2) Lock only queue, not whole dictionary 3) Test count first and when it's insufficient, create new message, both should be safe to do out of any lock 4) Custom consumer/producer non-locking (except resize) queue could be better (maybe overkill) More...

Inheritance diagram for VRageRender.MyMessagePool:

Public Member Functions

 MyMessagePool ()
 
void Clear (MyRenderMessageEnum message)
 
Get< T > (MyRenderMessageEnum renderMessageEnum)
 
void Return (MyRenderMessageBase message)
 

Detailed Description

TODO: This should use some better sync, it could introduce delays with current state 1) Use spin lock 2) Lock only queue, not whole dictionary 3) Test count first and when it's insufficient, create new message, both should be safe to do out of any lock 4) Custom consumer/producer non-locking (except resize) queue could be better (maybe overkill)

Definition at line 20 of file MyMessageQueue.cs.

Constructor & Destructor Documentation

VRageRender.MyMessagePool.MyMessagePool ( )
inline

Definition at line 22 of file MyMessageQueue.cs.

Member Function Documentation

void VRageRender.MyMessagePool.Clear ( MyRenderMessageEnum  message)
inline

Definition at line 30 of file MyMessageQueue.cs.

T VRageRender.MyMessagePool.Get< T > ( MyRenderMessageEnum  renderMessageEnum)
inline
Type Constraints
T :MyRenderMessageBase 
T :new() 

Definition at line 35 of file MyMessageQueue.cs.

void VRageRender.MyMessagePool.Return ( MyRenderMessageBase  message)
inline

Definition at line 49 of file MyMessageQueue.cs.


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