Commit
95ef3487711b7c7fc846574c6cad19579ba5df46
by noreplyMake iterator counting in IteratorSafeOrderedReferenceSet thread-safe for async mob spawning (#109)
The iterator count was affected by a race condition and would therefore sometimes go into the negatives, or not decrement at all
This would cause the defragmentation of the IteratorSafeOrderedReferenceSet to no longer work, as the defragmentation is only allowed to run if no iterator is currently iterating
The inactive defragmentation would cause the IteratorSafeOrderedReferenceSet$BaseIterator#hasNext() method to show up in profiler reports, as the array which backs the IteratorSafeOrderedReferenceSet$BaseIterator would no longer be de-fragmented and would therefore grow very big
Async mob spawning of course still has many other possible points of failure (e.g. defragmentation running while another thread is iterating), but this fixes the most common issue I've (and others) have experienced
(commit: 95ef348)