Пример #1
0
 /// <summary>
 /// 获取数据
 /// </summary>
 /// <param name="connection"></param>
 internal override void RunLinkQueueTask(ref DbConnection connection)
 {
     try
     {
         value = queue.get(ref connection, node, key);
     }
     finally
     {
         wait.Set();
     }
 }
Пример #2
0
 /// <summary>
 /// 获取数据
 /// </summary>
 /// <param name="connection"></param>
 internal override Threading.LinkQueueTaskNode RunLinkQueueTask(ref DbConnection connection)
 {
     try
     {
         value = queue.get(ref connection, node, key);
     }
     finally
     {
         wait.Set();
     }
     return(LinkNext);
 }
Пример #3
0
 /// <summary>
 /// 获取缓存数据
 /// </summary>
 /// <param name="connection"></param>
 internal override void RunLinkQueueTask(ref DbConnection connection)
 {
     try
     {
         Value = queue.get(ref connection, node, key);
     }
     finally
     {
         if (System.Threading.Interlocked.CompareExchange(ref continuation, Pub.EmptyAction, null) != null)
         {
             new Task(continuation).Start();
         }
     }
 }
Пример #4
0
 /// <summary>
 /// 获取缓存数据
 /// </summary>
 /// <param name="connection"></param>
 internal override void RunLinkQueueTask(ref DbConnection connection)
 {
     try
     {
         Value = queue.get(ref connection, node, key);
     }
     catch (Exception error)
     {
         Value = error;
     }
     finally
     {
         IsCompleted = true;
         if (continuation != null || System.Threading.Interlocked.CompareExchange(ref continuation, Common.EmptyAction, null) != null)
         {
             continuation();
         }
     }
 }