資源簡介
線程管理示例代碼
代碼片段和文件信息
using?System;
using?System.Threading;
using?System.Collections;
?/*
?????How?to?use?Thread?Classs
?????*?
?????*?==============
?????*?public?ELMService()
????????{
????????????InitializeComponent();
????????????etm.ClalThreadPool(“EmailThreads“?(uint)ApplicationInfo.EmailParsingThreads);
????????}?
?????*?//queue?items?in?thread?for?processing.
?????*?etm.QueueUserEmailWorkItem(new?WaitCallback(ELMService_UpdateLogHandler)?objSupplier);
???????public?void?ELMService_UpdateLogHandler(object?objmsg)
?????*?{
?????*??return;
?????*?}
?????*?
?????*/
namespace?WorkflowManagement
{
????public?delegate?void?ThreadActivationCallback();
????public?delegate?void?JobFinishCallback(object?state);
????public?delegate?bool?onerrorCallback(Exception?exc);
????public?class?ThreadManager
????{
??
- 上一篇:C#做的QQ完整(支持聊天、文件傳輸、截圖等功能)
- 下一篇:c# 多線程
評論
共有 條評論