【发布时间】:2022-02-02 01:05:23
【问题描述】:
如果我有一个异步方法,其参数中包含一个异步方法和一个非异步方法。
哪个方法会先运行?
例子:
await ExampleMethod(
Func<Task>: await Example.SomeMethod(),
Func<IEnumerable<T>> Example.SomeOtherMethod()
);
【问题讨论】:
-
你测试的时候发生了什么?
-
它在本地运行良好,但在实时环境中却不行
-
“很好”?这是什么意思?
-
在 SomeMethod 中首先在本地运行,但在实时环境中它似乎没有