所以这里是删除和事件
public delegate Task SomeEventHandler(SomeEventArgs e); ... public event SomeEventHandler OnSomething;
订阅者(多个)
some.OnSomething += DoSomething; ... public async Task DoSomething(SomeEventArgs e) { await SomethingElse(); e.A = true; }
事件电话
if (this.OnSomething != null) await this.OnSomething(args); // Here args.A is false // It should be true
问题是即使DoSomething没有完成,最后一部分也会继续.会出现什么问题?