编写一个线程同步类,用mutex
来源:百度知道 编辑:UC知道 时间:2024/08/23 03:43:46
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading ;
namespace 多线程
{
class Program
{
Thread thread1 = null;
Thread thread2 = null;
Mutex mutex = null;
public static void Main()
{
//Monitor类的使用
//lock语句其实后台解析为Monitor类的调用
//En