protected override void ProcessBatch() { if (ShouldParallelize) { ThreadHandler.For(0, _batches.Length, i => { ref var batch = ref _batches[i]; Process(batch.EntityId, ref *batch.Component1, ref *batch.Component2); });
protected override void ProcessBatch() { if (ShouldParallelize) { ThreadHandler.For(0, _batches.Length, i => { var batch = _batches[i]; Process(batch.EntityId, batch.Component1, batch.Component2); }); return; } for (var i = 0; i < _batches.Length; i++) { var batch = _batches[i]; Process(batch.EntityId, batch.Component1, batch.Component2); } }
protected override void ProcessBatch() { if (ShouldParallelize) { ThreadHandler.For(0, ObservableGroup.Count, i => { var batch = _batches[i]; Process(batch.EntityId, batch.Component1, batch.Component2); }); return; } for (var i = 0; i < ObservableGroup.Count; i++) { var batch = _batches[i]; Process(batch.EntityId, batch.Component1, batch.Component2); } }