资源简介
原创C#多线程详细示例及PPT文档,适于教学和研发。希望对您有帮助 C# multi-threaded detailed examples and PPT documents, suitable for teaching and research and development. Want to help you
多线程示例
==========
1 PThreadDemo1 多线程示例
理解:如无多线程,则阻塞相关应用
2 PThreadDemo2 多线程示例
理解:多线程无序现象
3 PThreadDemo3 使用LOCK 示例
4 PThreadDemo4 使用 MONITOR 示例
5 PThreadDemo5 使用 AutoResetEvent 示例
6 PThreadDemo6 使用 ManualResetEvent 示例
7 PThreadDemo7 BackgroundWorker 后台线程示例
8 ThreadPool 线程池示例(微软)
代码片段和文件信息
using System;
using System.Collections.Generic;
#region //
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
#endregion
using System.Threading; //
namespace PTheadDemo1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
Control.CheckForIllegalCrossThreadCalls = false; //
}
clsForTh obj = new clsForTh();
private void button1_Click(object sender EventArgs e)
{
obj.times = 10;
doWithOutThread();
//doWithThead();
label1.Text = “END“;
}
private void doWithOutThread()
{
obj.LoopMethod();
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 9216 2009-12-14 09:57 PThreadDemo3\PThreadDemo3\bin\Debug\PTheadDemo2.exe
文件 30208 2009-12-14 09:57 PThreadDemo3\PThreadDemo3\bin\Debug\PTheadDemo2.pdb
文件 14328 2009-12-14 11:47 PThreadDemo3\PThreadDemo3\bin\Debug\PTheadDemo2.vshost.exe
文件 490 2007-07-21 01:33 PThreadDemo3\PThreadDemo3\bin\Debug\PTheadDemo2.vshost.exe.manifest
文件 2523 2009-12-14 09:59 PThreadDemo3\PThreadDemo3\Form1.cs
文件 3111 2009-12-14 09:54 PThreadDemo3\PThreadDemo3\Form1.Designer.cs
文件 5814 2009-12-14 09:54 PThreadDemo3\PThreadDemo3\Form1.resx
文件 648 2009-12-14 09:39 PThreadDemo3\PThreadDemo3\obj\Debug\PTheadDemo2.csproj.FileListAbsolute.txt
文件 847 2009-12-14 09:33 PThreadDemo3\PThreadDemo3\obj\Debug\PTheadDemo2.csproj.GenerateResource.Cache
文件 9216 2009-12-14 09:57 PThreadDemo3\PThreadDemo3\obj\Debug\PTheadDemo2.exe
文件 180 2009-12-14 09:54 PThreadDemo3\PThreadDemo3\obj\Debug\PTheadDemo2.Form1.resources
文件 30208 2009-12-14 09:57 PThreadDemo3\PThreadDemo3\obj\Debug\PTheadDemo2.pdb
文件 180 2009-12-14 09:29 PThreadDemo3\PThreadDemo3\obj\Debug\PTheadDemo2.Properties.Resources.resources
文件 1314 2009-12-14 09:44 PThreadDemo3\PThreadDemo3\obj\Debug\PThreadDemo2.csproj.FileListAbsolute.txt
文件 847 2009-12-14 09:41 PThreadDemo3\PThreadDemo3\obj\Debug\PThreadDemo2.csproj.GenerateResource.Cache
文件 665 2009-12-14 11:47 PThreadDemo3\PThreadDemo3\obj\Debug\PThreadDemo3.csproj.FileListAbsolute.txt
文件 847 2009-12-14 09:54 PThreadDemo3\PThreadDemo3\obj\Debug\PThreadDemo3.csproj.GenerateResource.Cache
文件 472 2009-12-14 09:11 PThreadDemo3\PThreadDemo3\Program.cs
文件 1354 2009-12-14 09:11 PThreadDemo3\PThreadDemo3\Properties\AssemblyInfo.cs
文件 2872 2009-12-14 09:11 PThreadDemo3\PThreadDemo3\Properties\Resources.Designer.cs
文件 5612 2009-12-14 09:11 PThreadDemo3\PThreadDemo3\Properties\Resources.resx
文件 1096 2009-12-14 09:11 PThreadDemo3\PThreadDemo3\Properties\Settings.Designer.cs
文件 249 2009-12-14 09:11 PThreadDemo3\PThreadDemo3\Properties\Settings.settings
文件 3354 2009-12-14 09:11 PThreadDemo3\PThreadDemo3\PThreadDemo3.csproj
文件 926 2009-12-14 09:45 PThreadDemo3\PThreadDemo3.sln
..A..H. 14336 2009-12-14 11:47 PThreadDemo3\PThreadDemo3.suo
文件 9216 2009-12-14 11:47 PThreadDemo4\PThreadDemo4\bin\Debug\PTheadDemo.exe
文件 26112 2009-12-14 11:47 PThreadDemo4\PThreadDemo4\bin\Debug\PTheadDemo.pdb
文件 14328 2009-12-14 16:20 PThreadDemo4\PThreadDemo4\bin\Debug\PTheadDemo.vshost.exe
文件 490 2007-07-21 01:33 PThreadDemo4\PThreadDemo4\bin\Debug\PTheadDemo.vshost.exe.manifest
............此处省略265个文件信息
相关资源
- C#联通网络宽带测试 拨号
- C#百度指数抓取方法(2012年版本已失
- C# 隐藏某个磁盘分区
- C# 读取并编辑window系统的右键菜单
- C#自定义屏保(不断滚动的文字)
- C#winform打印指定区域 -控件拖动 -设置
- C#使用Hook进行改键
- 提供C#调用系统API函数弹出或收起光驱
- 通过C#自带的头文件(类)获取Windo
- C#获取电脑CPU以及内存使用率
- 利用uu云打码平台的lib实现的c#打码平
- tf-idf一种计算方法
- C# pop3 邮件接收程序
- C# 邮件群发示例 源码下载18952
- 动态抓取IPC#实现
- XXTEA算法的C#实现和JS实现,可以互相
- C# 飞行棋 游戏源码(面向对象入门)
- 基于WinPcap的C# ARP欺骗软件().rar
- C#网络应用编程 矩阵并行计算练习
- 《C#版Ftp软件源码》
-
C# 播放铃声(AxWindowsMediaPla
yer)最新 - C# 把图片显示成椭圆形状
- C# 水平交错效果显示图像
- winform 浮雕效果的图像
- c# 底片效果显示图像就像旧式相机的
- 积木效果显示图像
- C# 隐形窗体 (没有边框,没有标题栏
- browerPhotoC#网页截图(不打开网页)
- C# 模拟时钟(自绘Graphics)
- C#之WPF重绘动态正弦余弦曲线
评论
共有 条评论