예제 #1
0
        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);
        }
예제 #2
0
 public SQLQueryHolderTask(SQLQueryHolder <R> holder)
 {
     m_holder = holder;
     m_result = new TaskCompletionSource <SQLQueryHolder <R> >();
 }