真是BT啊...也不知道如何来做,难道是把所有的线程都Hang住么?
( 唱到:如果是这样,你不要悲伤~~~!!!)
用下面这个代码试试看看:
1 using System; 2 using System.Threading; 3 4 public class Test { 5 public static void Main(String[] args) { 6 //Thread.CurrentThread.Sleep(500); 7 Thread.CurrentThread.Join(5000000); 8 Console.WriteLine("874 Heaven * 100"); 9 } 10 }
|
原因如下 (摘自
http://blog.joycode.com/xinz/archive/2004/08/22/31313.aspx ):
Thread.Join
Blocks the calling thread until a thread terminates or the specified time elapses.
|
Thread.Sleep Blocks the current thread for the specified number of milliseconds.
|
但是它们有细微而重要的区别,根据这个BLOG :
Thread.Sleep is a little unusual. We can take control of threads that are inside this service. But, following the tradition of Sleep on the underlying Windows operating system, we perform no pumping.
If you need to Sleep on an STA thread, but you want to perform the standard COM and SendMessage pumping, consider Thread.CurrentThread.Join(timeout) as a replacement.
分享到:
相关推荐
heaven7.exe 7、 金属迷城 6.00 KB (6,144 字节) 考虑到它的大小时,你会不会体会到奇迹的含义 附件:metal.exe 8、 我要重点推荐的是这个作品fr-041_debris.exe(177K),效果是这所有作品之中最好的,一般的电脑无法...
显卡测试软件Unigine_Heaven-4.0.run 显卡测试软件Unigine_Heaven-4.0.run显卡测试软件Unigine_Heaven-4.0.run 显卡测试软件Unigine_Heaven-4.0.run 显卡测试软件Unigine_Heaven-4.0.run 显卡测试软件Unigine_Heaven...
Discuz! Heaven_And_Earth模板
Axe - Heaven on earth
Geekbench Pro的安装过程是一个非常简单的,一旦安装过程完成,您可以选择何时开始测试您的CPU的全部功能。 如果你需要确保结果是尽可能精确的,那么强烈建议终止所有其他程序是开放的,只运行Geekbench Pro。 该...
8、 我要重点推荐的是这个作品fr-041_debris.exe(177K),效果是这所有作品之中最好的,一般的电脑无法流畅运行,我认为你买电脑时 可以把它带上运行一下作为一款测试工具。 附件:fr-041_debris.exe 9、 这个作品...
8.我要重点推荐的是这个作品fr-041_debris.exe(177K),效果是这所有作品之中最好的,一般的电脑无法流畅运行,我认为你买电脑时可以把它带上运行一下作为一款测试工具。 不得不说的是,桥下我测试过,我的小本本没...
8、 我要重点推荐的是这个作品fr-041_debris.exe(177K),效果是这所有作品之中最好的,一般的电脑无法流畅运行,我认为你买电脑时 可以把它带上运行一下作为一款测试工具。 附件:fr-041_debris.exe 9、 这个作品...
heaven_kit HeavenOSK制造的实用程序。
8、 我要重点推荐的是这个作品fr-041_debris.exe(177K),效果是这所有作品之中最好的,一般的电脑无法流畅运行,我认为你买电脑时 可以把它带上运行一下作为一款测试工具。 附件:fr-041_debris.exe 9、 这个作品...
Unigine_Heaven-4.0 Linux 3D test Unigine_Heaven-4.0 Linux 3D test Unigine_Heaven-4.0 Linux 3D test
Extreme performance and stability test for PC hardware: video card, power supply, cooling system. Check your rig in stock and overclocking modes with real-life load! Also includes interactive ...
本资源包括微程序控制器(proteus模拟)、微程序控制器框图和总图 模型机运行环境:proteus8 professional、windows10 本资源配套博文https://blog.csdn.net/air__Heaven/article/details/112383675
国际程序设计大赛的作品欣赏 先来第一个: 一段纯 3D 的 DOS 动画,据说是获一等奖的作品。虽然它不是最精美的, 但是当你得知它只有 4K 时,会不会立刻疯死掉呢? 附件 3ddemo.com 再来一个...
此程序仅用64K空间编写,却收到如此效果,值得阅读
国际程序设计大赛的作品欣赏 先来第一个: 一段纯 3D 的 DOS 动画,据说是获一等奖的作品。虽然它不是最精美的, 但是当你得知它只有 4K 时,会不会立刻疯死掉呢? 附件 3ddemo.com 再来一个...
国际程序设计大赛的作品欣赏 先来第一个: 一段纯 3D 的 DOS 动画,据说是获一等奖的作品。虽然它不是最精美的, 但是当你得知它只有 4K 时,会不会立刻疯死掉呢? 附件 3ddemo.com 再来一个...
该程序的输入是一个文本文件,包括一组由该正规文法产生的产生式以及待识别源代码字符串。该程序的输出是一个符号表(二元式),它由5种类型符号:关键词,识别符,常量,界符和操作符。 用子集法将NFA转化为DFA。 ...
更好的面对内心世界,对禅做了深入别致的探讨