Procedural-Landmass-Generation icon indicating copy to clipboard operation
Procedural-Landmass-Generation copied to clipboard

Lock .Dequeue()?

Open victorbstan opened this issue 8 years ago • 1 comments

Should there be a lock (dataQueue){ ... } around .Dequeue() in ThreadedDataRequester.cs > Update() method? As there is a lock for Enqueue()? I have seen the resulting parameter be null in cases with very high terrain chunk numbers, but only intermittently, which leads me to this method... threadInfo.callback(threadInfo.parameter);

victorbstan avatar Aug 08 '17 03:08 victorbstan

I agree. If you need to lock for one you should lock for both.

erebuswolf avatar Sep 15 '17 04:09 erebuswolf