It's not actually "lock free", like the branch name, but it's a lot closer than it was.
Lock contention was adding 5-16 ms (!) to frames, for operations that should have been instantaneous ("enqueueing" things). Basically, DFConnection was locking things while talking to DF, and then GameMap had to wait for it to finish before it could update those things. Now, those operations are actually instantaneous.
Future work: use concurrent queues when talking to BlockMesher.
Potential issue: dave-hillier/disruptor-unity3d is apache licensed. I added the license to the folder where it is (Assets/MapGen/Util); is it necessary to do anything else?
It's not actually "lock free", like the branch name, but it's a lot closer than it was. Lock contention was adding 5-16 ms (!) to frames, for operations that should have been instantaneous ("enqueueing" things). Basically, DFConnection was locking things while talking to DF, and then GameMap had to wait for it to finish before it could update those things. Now, those operations are actually instantaneous.
Adds data structures from:
Future work: use concurrent queues when talking to BlockMesher.
Potential issue: dave-hillier/disruptor-unity3d is apache licensed. I added the license to the folder where it is (Assets/MapGen/Util); is it necessary to do anything else?