SebLague / Pathfinding

MIT License
668 stars 251 forks source link

Missing Thread? #2

Open CodeDux opened 7 years ago

CodeDux commented 7 years ago

I might be sleepy but shouldn't this https://github.com/SebLague/Pathfinding/blob/968c255f50274021e84acbb5a2f39ee505d7f754/Episode%2010%20-%20threading/Assets/Scripts/PathRequestManager.cs#L35

say something like new Thread(threadStart).Start(); instead of threadStart.Invoke(); since ThreadStart only is a delegate and not a threadwrapper.

Bakhmach commented 5 years ago

@CodeDux , Really, he execute path finding methods in the same thread. Otherwise, he has a race condition with state of Nodes in Grid, I think.