Esempio n. 1
0
 public static void NewSocketRedis14SetTest()
 {
     RunAction((key) =>
     {
         return(_redisClient14.SetAsync(key, key));
     }, "NewRedis14");
 }
Esempio n. 2
0
        public Task <bool> SetAsync(byte[] bytes)
        {
            var taskSource = CreateTask(null, TaskCreationOptions.RunContinuationsAsynchronously);

            if (_node1.TryGetSendLock())
            {
                _node1.SetAsync(bytes, taskSource);
            }
            else if (_node2.TryGetSendLock())
            {
                _node2.SetAsync(bytes, taskSource);
            }
            else
            {
                _node3.SetAndWaitAsync(bytes, taskSource);
            }

            return(taskSource);
        }