A* Pathfinding Project
3.8.5
The A* Pathfinding Project for Unity 3D
|
Implements a lock free multiple producer - single consumer stack for the Path object. More...
Implements a lock free multiple producer - single consumer stack for the Path object.
Though it probably works for multiple producer - multiple consumer as well.
On iOS it degrades to using locking since Interlocked.CompareExchange is not available on the iOS platform.
Public Member Functions | |
Path | PopAll () |
Pops all items from the stack and returns the head. | |
void | Push (Path p) |
Pushes a path onto the stack. | |
Public Attributes | |
Path | head |
Path PopAll | ( | ) |
Pops all items from the stack and returns the head.
To loop through all popped items, simple traverse the linked list starting with the head and continuing with item.next until item equals null
void Push | ( | Path | p | ) |
Pushes a path onto the stack.
Will loop while trying to set the head of the stack to p.
Path head |