A* Pathfinding Project
3.1.4
The A* Pathfinding Project for Unity 3D
|
Implements a lock free multiple producer - single consumer stack for the Path object. More...
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 |
Implements a lock free multiple producer - single consumer stack for the Path object.
Though it probably works for multiple producer - multiple consumer as well.
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.