WmptWap/App_LocalResources/CheckOrder.cs
(开头部分) 6KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/* ***********************************************
* author : jijunjian
* email :
* function: 处理没有处理的订单
* history : CopyRight (c) 2009-2016 WMPT Teconology. All Rights Reserved.
* time : 2010-5-19 18:15:06
* ***********************************************/
using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Collections;
using System.Collections.Generic;
using System.Threading;
using WMPT.SQLServerDAL;
using WMPT.Model;
/// <summary>
///CheckOrder 的摘要说明
/// </summary>
public class CheckOrder
{
public CheckOrder()
{
int result = 0; //一个标志位,如果是0表示程序没有出错,如果是1表明有错误发生
Cell cell = new Cell();
CellProd prod = new CellProd(cell);
CellCons cons = new CellCons(cell, cell.queueList.Count);
Thread producer = new Thread(new ThreadStart(prod.ThreadRun)); //该进程调用start后,就执行ThreadRun函数。
Thread consumer = new Thread(new ThreadStart(cons.ThreadRun));
//生产者线程和消费者线程都已经被创建,但是没有开始执行
try
{
producer.Name = "producer";
producer.Start(); //开始producer进程。
consumer.Name = "consumer";
consumer.Start(); //开始consumer进程。
//producer.Join(); //让主进程等待,直到producer进程结束。
//consumer.Join(); //让主进程等待,直到consumer进程结束。
//等producer和consumer进程完成后,才向下面做。
//调试信息:
Console.WriteLine("Finish");
}
catch (ThreadStateException e)
{
//当线程因为所处状态的原因而不能执行被请求的操作
Console.WriteLine(e);
result = 1;
后面还有 143 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
