public Task <SQLQueryHolder <R> > DelayQueryHolder <R>(SQLQueryHolder <R> holder) { SQLQueryHolderTask <R> task = new SQLQueryHolderTask <R>(holder); // Store future result before enqueueing - task might get already processed and deleted before returning from this method Task <SQLQueryHolder <R> > result = task.GetFuture(); _queue.Push(task); return(result); }
public SQLQueryHolderTask(SQLQueryHolder <R> holder) { m_holder = holder; m_result = new TaskCompletionSource <SQLQueryHolder <R> >(); }