【问题标题】:Is it possible to wait on a task from a thread other than the parent thread?是否可以等待来自父线程以外的线程的任务?
【发布时间】:2011-09-28 10:22:15
【问题描述】:

我需要等待我在生产代码中从测试代码创建的任务。有可能这样做吗?我正在使用 Nunit 框架进行测试。

【问题讨论】:

    标签: .net c#-4.0 nunit


    【解决方案1】:

    你应该可以从任何线程Task.Wait

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-03-10
      • 2018-02-26
      • 2020-02-15
      • 1970-01-01
      • 2015-07-13
      • 2011-08-13
      • 2016-06-22
      相关资源
      最近更新 更多