public Task <bool> AddBatch(List <ComponentWithId> components, string collectionName) { TaskCompletionSource <bool> tcs = new TaskCompletionSource <bool>(); DBSaveBatchTask task = ComponentFactory.Create <DBSaveBatchTask, List <ComponentWithId>, string, TaskCompletionSource <bool> >(components, collectionName, tcs); this.tasks[(int)((ulong)task.Id % taskCount)].Add(task); return(tcs.Task); }
public override void Awake(DBSaveBatchTask self, List <Component> disposers, string collectionName, TaskCompletionSource <bool> tcs) { self.Disposers = disposers; self.CollectionName = collectionName; self.Tcs = tcs; }
public override void Awake(DBSaveBatchTask self, List <ComponentWithId> components, string collectionName, ETTaskCompletionSource tcs) { self.Components = components; self.CollectionName = collectionName; self.Tcs = tcs; }