Share via


TaskHelpers.AwaitWithTimeout(Task, TimeSpan) 方法

定义

public:
[System::Runtime::CompilerServices::Extension]
 static System::Threading::Tasks::Task<bool> ^ AwaitWithTimeout(System::Threading::Tasks::Task ^ task, TimeSpan timeout);
public static System.Threading.Tasks.Task<bool> AwaitWithTimeout (this System.Threading.Tasks.Task task, TimeSpan timeout);
static member AwaitWithTimeout : System.Threading.Tasks.Task * TimeSpan -> System.Threading.Tasks.Task<bool>
<Extension()>
Public Function AwaitWithTimeout (task As Task, timeout As TimeSpan) As Task(Of Boolean)

参数

task
Task
timeout
TimeSpan

返回

适用于