我有这个代码在Stackexchange.Redis中添加对象和索引字段.事务冻结线程中的所有方法.为什么?
var transaction = Database.CreateTransaction();
//this line freeze thread. WHY ?
await transaction.StringSetAsync(KeyProvider.GetForID(obj.ID), PreSaveObject(obj));
await transaction.HashSetAsync(emailKey, new[] { new HashEntry(obj.Email, Convert.ToString(obj.ID)) });
return await transaction.ExecuteAsync();
Run Code Online (Sandbox Code Playgroud)