Ejemplo n.º 1
0
        public Task <bool> SetAsync(string key, string value)
        {
            var bytes      = Encoding.UTF8.GetBytes($"SET {key} {value}\r\n");
            var taskSource = new TaskCompletionSource <bool>();

            _receiverQueue.Enqueue(taskSource, bytes);
            return(taskSource.Task);
        }
Ejemplo n.º 2
0
        public Task <bool> SetAsync(string key, string value)
        {
            var bytes      = Encoding.UTF8.GetBytes($"SET {key} {value}\r\n");
            var taskSource = _getTask();

            _receiverQueue.Enqueue(taskSource, bytes);
            return(taskSource);
        }