净谦

导航

2012年3月18日 #

SharedResourceLeadToDataError

摘要: using System;using System.Collections.Generic;using System.Text;using System.Threading;namespace SharedResourceLeadToDataError{ class Program { static void Main(string[] args) { Thread[] ths = new Thread[4]; for (int i = 0; i < 4; i++) { ths[i] = new Thread(increaseCoun... 阅读全文

posted @ 2012-03-18 13:30 康安V 阅读(145) 评论(0) 推荐(0)

SharedResource Lead To Deadlock sample[转自: Net4.0面向对象编程漫谈(应用篇)]

摘要: using System;using System.Collections.Generic;using System.Text;using System.Threading;namespace SharedResourceLeadToDeadlock{ class Program { //共享资源 static SharedResource R1 = new SharedResource(); static SharedResource R2 = new SharedResource(); static void Main(string[] args) { Thread th1 = new . 阅读全文

posted @ 2012-03-18 13:11 康安V 阅读(138) 评论(0) 推荐(0)

Join Lead to DeadLock sample[转自: Net4.0面向对象编程漫谈(应用篇)]

摘要: using System;using System.Collections.Generic;using System.Text;using System.Threading;namespace JoinLeadToDeadlock{ class Program { static Thread mainThread; static void Main(string[] args) { Console.WriteLine("主线程开始运行"); mainThread = Thread.CurrentThread; Thread ta = new Thread(new Threa 阅读全文

posted @ 2012-03-18 13:01 康安V 阅读(145) 评论(0) 推荐(0)

进程与进程间通讯[转自: Net4.0面向对象编程漫谈(应用篇)]

摘要: using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.Diagnostics;using System.IO;namespace ProcessInfo{ public partial class frmStartNewProcess : Form { public frmStartNewProcess() { 阅读全文

posted @ 2012-03-18 00:18 康安V 阅读(216) 评论(0) 推荐(0)