ab56a9bcf7
SVN-Revision: r240
42 lines
841 B
C#
42 lines
841 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading;
|
|
using System.Collections;
|
|
|
|
namespace Lskj.Util
|
|
{
|
|
/// <summary>
|
|
/// 线程执行的函数代理
|
|
/// </summary>
|
|
public delegate void ThreadFun();
|
|
|
|
/// <summary>
|
|
/// 线程处理类
|
|
/// </summary>
|
|
public abstract class ThreadHelper
|
|
{
|
|
|
|
|
|
private static Thread hThread;
|
|
|
|
protected ThreadHelper()
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// 指定一个函数代理让线程执行
|
|
/// </summary>
|
|
/// <param name="fun"></param>
|
|
public static void AddProcedure(ThreadFun fun)
|
|
{
|
|
hThread = new Thread(new ThreadStart(fun));
|
|
//hThread.IsBackground = true;
|
|
hThread.Start();
|
|
}
|
|
|
|
|
|
}
|
|
}
|