【发布时间】:2013-04-18 15:13:57
【问题描述】:
c# 如何在不停止主线程的情况下在 2 个函数调用之间暂停
Foo();
Foo(); // i want this to run after 2 min without stopping main thread
Function Foo()
{
}
谢谢
【问题讨论】:
-
使用计时器,或为两者和 thread.sleep 使用单独的线程
-
看这个,解释为什么定时器比停止线程更有效..stackoverflow.com/questions/391621/…
标签: c# multithreading