Pathfinding.ThreadControlQueue.TerminateReceivers C# (CSharp) Method

TerminateReceivers() public method

public TerminateReceivers ( ) : void
return void
		public void TerminateReceivers () {
			terminate = true;
			block.Set();
		}
		

Usage Example

コード例 #1
0
ファイル: PathProcessor.cs プロジェクト: PerryW11/Androidema
        public void TickNonMultithreaded()
        {
            // Process paths
            if (threadCoroutine != null)
            {
                try {
                    threadCoroutine.MoveNext();
                } catch (System.Exception e) {
                    //This will kill pathfinding
                    threadCoroutine = null;

                    // Queue termination exceptions should be ignored, they are supposed to kill the thread
                    if (!(e is ThreadControlQueue.QueueTerminationException))
                    {
                        Debug.LogException(e);
                        Debug.LogError("Unhandled exception during pathfinding. Terminating.");
                        queue.TerminateReceivers();

                        // This will throw an exception supposed to kill the thread
                        try {
                            queue.PopNoBlock(false);
                        } catch {}
                    }
                }
            }
        }