惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Privacy International News Feed
Security Archives - TechRepublic
Security Archives - TechRepublic
The Cloudflare Blog
D
Docker
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
TaoSecurity Blog
TaoSecurity Blog
GbyAI
GbyAI
小众软件
小众软件
C
Cybersecurity and Infrastructure Security Agency CISA
V
Visual Studio Blog
L
LINUX DO - 热门话题
Recorded Future
Recorded Future
W
WeLiveSecurity
Vercel News
Vercel News
N
News and Events Feed by Topic
Y
Y Combinator Blog
N
News and Events Feed by Topic
博客园 - 聂微东
酷 壳 – CoolShell
酷 壳 – CoolShell
The GitHub Blog
The GitHub Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
P
Palo Alto Networks Blog
IT之家
IT之家
Attack and Defense Labs
Attack and Defense Labs
Know Your Adversary
Know Your Adversary
Hugging Face - Blog
Hugging Face - Blog
H
Heimdal Security Blog
C
CERT Recently Published Vulnerability Notes
博客园 - 叶小钗
C
CXSECURITY Database RSS Feed - CXSecurity.com
C
Check Point Blog
阮一峰的网络日志
阮一峰的网络日志
罗磊的独立博客
云风的 BLOG
云风的 BLOG
N
Netflix TechBlog - Medium
The Last Watchdog
The Last Watchdog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
T
Tor Project blog
Last Week in AI
Last Week in AI
S
Security @ Cisco Blogs
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Google Online Security Blog
Google Online Security Blog
Jina AI
Jina AI
T
Tenable Blog
月光博客
月光博客
J
Java Code Geeks
Microsoft Azure Blog
Microsoft Azure Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
S
Schneier on Security
H
Help Net Security

博客园 - luckyzmw

ASP.net里大文件上传的问题讨论 E680最强综合技巧集合 E680I常用工具和使用说明 Code Snippet Libraries压缩下载包 企业库中的一个小发现 企业库中的objectBuild类分析 企业库core中configuration部分类的分析 如何创建一个自定义帐户来运行 ASP.NET 新手学习XSL的好东西 UML相关的工具 广告管理系统的UML分析与设计 几家最好的IT公司面试全揭秘 ASP.NET常用代码 NameValueCollection的用法 Microsoft Windows Workflow Foundation 入门:开发人员演练 为何使用表格排版是不明智的 Fitch and Mather 7.0 概述 MAVERICK.NET好用吗 ASP.NET下MVC设计模式的实现
多线程的简单示例
luckyzmw · 2005-12-13 · via 博客园 - luckyzmw

看企业库的ConfigurationChangeWatcher,里面用了多线程,自己以前没有写过,写了一个小demo,最简单的,分享一下:

        [STAThread]
        
static void Main(string[] args)
        
{
            System.Threading.Thread t 
= new System.Threading.Thread(new System.Threading.ThreadStart(test));
            t.Start();
            System.Threading.Thread.Sleep(
500);
            
for (int i = 0 ; i < 1000 ; i++)
            
{
                Console.WriteLine(
"main");
                System.Threading.Thread.Sleep(
1000);
            }


        }


        
static void test()
        
{
            
for (int i = 0 ; i < 1000 ; i++)
            
{
                Console.WriteLine(
"test");
                System.Threading.Thread.Sleep(
1000);
            }

        }

    }