Esempio n. 1
0
        public override Task <ReadReply> Read(ReadRequest req, ServerCallContext _)
        {
            man.CheckFreeze();
            ReadReply reply = new ReadReply {
                Val = store.Read(req.IdPart, req.IdObj)
            };

            Lib.Sleep(new Random().Next(minDelay, maxDelay));
            return(Task.FromResult(reply));
        }
Esempio n. 2
0
        public override Task <ReadReply> Read(ReadRequest req, ServerCallContext _)
        {
            man.CheckFreeze();
            ReadReply res = new ReadReply {
                Val = store.Read(req.IdPart, req.IdObj),
                Tag = ServerManager.RInfos[req.IdPart].PInfo.Tag
            };

            Lib.Sleep(new Random().Next(minDelay, maxDelay));
            return(Task.FromResult(res));
        }