Pathfinding.ThreadControlQueue.PushFront C# (CSharp) Method

PushFront() public method

public PushFront ( Path p ) : void
p Path
return void
		public void PushFront (Path p) {
			//If termination is due, why add stuff to a queue which will not be read from anyway
			if (terminate) return;
			
			lock (lockObj) {
				if (tail == null) {// (tail == null) ==> (head == null)
					head = p;
					tail = p;
					
					if (starving && !blocked) {
						starving = false;
						block.Set();
					} else {
						starving = false;
					}
				} else {
					p.next = head;
					head = p;
				}
			}
		}