public ETTask <T> Update <T>(T entity) where T : ComponentWithId
        {
            var       type  = typeof(T);
            CacheBase cache = null;

            caches.TryGetValue(type, out cache);
            ETTaskCompletionSource <T> tcs  = new ETTaskCompletionSource <T>();
            CacheUpdateTask <T>        task = ComponentFactory.Create <CacheUpdateTask <T>, CacheBase, T, ETTaskCompletionSource <T> >(cache, entity, tcs);

            this.tasks[(int)((ulong)task.Id % taskCount)].Add(task);
            return(tcs.Task);
        }
 public override void Awake(CacheUpdateTask <ComponentWithId> self, CacheBase proxy, ComponentWithId entity, ETTaskCompletionSource <ComponentWithId> tcs)
 {
     self.proxy  = proxy;
     self.Tcs    = tcs;
     self.entity = entity;
 }