The two methods that access and modify this data are commonly running in different threads. queueDirtyAggregates always runs in aggregation thread 0 and adds items to the queues. generateMeshesFromQueues runs across all aggregation threads and pulls items out of the maps and aggregates them. The maps need to be lock protected, but this isn't a trivial addition with the current code structure in generateMeshesFromQueue since it would have to take the lock for the entire duration of its call.
The two methods that access and modify this data are commonly running in different threads. queueDirtyAggregates always runs in aggregation thread 0 and adds items to the queues. generateMeshesFromQueues runs across all aggregation threads and pulls items out of the maps and aggregates them. The maps need to be lock protected, but this isn't a trivial addition with the current code structure in generateMeshesFromQueue since it would have to take the lock for the entire duration of its call.