当我使用时:`publiccall(Func>func){vartask=func(redisInstance);task.wait();returntask.Result;}`调用:call(client=>redisInstance.SetMembersAsync(setName))它工作正常,但是当有很多请求时,“CPU”使用率会增加;但在第二种情况下:`publicasynccall2(Func>func){vartask=func(redisInstance);returnawaittask.Result;}`调用:call2(asyncclient=>awaitredisI
我尝试使用StackExchange.Redisnuget将同步Redis存储转换为.NETCore2.2WebAPI的异步实现。同步版本有效。BasicUsageGuide状态:Additionally,ifyouplantomakeuseoftheasynchronousAPIandyourequiretheTask.AsyncStatetohaveavalue,thiscanalsobespecified:intdatabaseNumber=...objectasyncState=...IDatabasedb=redis.GetDatabase(databaseNumber,as
我尝试使用StackExchange.Redisnuget将同步Redis存储转换为.NETCore2.2WebAPI的异步实现。同步版本有效。BasicUsageGuide状态:Additionally,ifyouplantomakeuseoftheasynchronousAPIandyourequiretheTask.AsyncStatetohaveavalue,thiscanalsobespecified:intdatabaseNumber=...objectasyncState=...IDatabasedb=redis.GetDatabase(databaseNumber,as