在 .net 中强制等待异步方法调用??例如,我有一个不想等待的 redis set 命令。
.....statements....
await redis.Hashes.Set(db, mainKey, value);
.....statements after set command......
我不想在 set 命令中暂停我的方法的执行。所以我删除了“等待”。
.....statements....
redis.Hashes.Set(db, mainKey, value);
....statements after set command......
这是一个好习惯吗??