Arch icon indicating copy to clipboard operation
Arch copied to clipboard

Fix thread-safety problem in World.WordSize

Open penspanic opened this issue 9 months ago • 1 comments

I found that World.WorldSize can have unintended value when create and destroy World multi-threaded. Simply use Interlocked methods to solve this problem.

Also unit test added: MultiThreadTest.MultiThreadedCreateAndDestroy

Sometimes test failed before fix.

penspanic avatar Jan 11 '25 11:01 penspanic