提交 f90a56c6 编写于 作者: H Heejae Chang

Merge pull request #875 from heejaechang/globalEvent

fix a case where we subscribe to an event while global operation is alre...
......@@ -62,7 +62,11 @@ private void OnGlobalOperationStarted(object sender, EventArgs e)
private void OnGlobalOperationStopped(object sender, GlobalOperationEventArgs e)
{
Contract.ThrowIfFalse(_globalOperation != null);
if (_globalOperation == null)
{
// we subscribed to the event while it is already running.
return;
}
// events are serialized. no lock is needed
_globalOperation.SetResult(null);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册