Torque3D Documentation / _generateds / ThreadSafeDeque::Node

ThreadSafeDeque::Node

Engine/source/platform/threads/threadSafeDeque.h

List node.

More...

Public Types

ValueType 

Public Friends

class

Public Attributes

Link to the freelist that the node has been allocated from.

Thread claim flag.

Reference to next node and deletion bit.

Reference to previous node and deletion bit.

Value contained in the node.

Public Functions

Node(ThreadSafeFreeList< Node > & freeList, const ValueType & value)

Construct an unlinked node allocated from "freeList".

Detailed Description

List node.

Public Types

typedef ThreadSafeDeque< T >::ValueType ValueType 

Public Friends

Public Attributes

ThreadSafeFreeList< Node > & mFreeList 

Link to the freelist that the node has been allocated from.

U32 mIsClaimed 

Thread claim flag.

This is to prevent two threads who concurrently do a tryPopFront() and tryPopBack() respectively on a deque with just a single node to both claim and return the same value (which would happen without the flag as otherwise both threads would use two different deletion bits for claiming the node).

NodeRef mNext 

Reference to next node and deletion bit.

NodeRef mPrev 

Reference to previous node and deletion bit.

ValueType mValue 

Value contained in the node.

Public Functions

Node(ThreadSafeFreeList< Node > & freeList, const ValueType & value)

Construct an unlinked node allocated from "freeList".