資源簡介
從易語言轉(zhuǎn)型到C#感覺C#自帶的線程池不夠靈活(或許是自己的技術(shù)不夠),所以自己寫了一個線程池工作類為了配合自己的使用習(xí)慣,有興趣的可以下載參考 代碼用到的是信號處理以及隊列等一些比較基礎(chǔ)的東西,已經(jīng)測試了功能基本上可用
代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Linq;
using?System.Text;
using?System.Windows.Forms;
using?System.Threading;
using?MyClass;
namespace?測試線程池
{
????public?partial?class?Form1?:?Form
????{
????????public?delegate?void?setlog(string?text);
????????private?ThreadPoolWork?ThreadPoolWork?=?new?ThreadPoolWork();
????????public?Form1()
????????{
????????????InitializeComponent();
????????????new?Thread(Setstart).Start();
????????}
????????private?void?button_cj_Click(object?sender?EventArgs?e)
????????{
????????????ThreadPoolWork.Start(1?3000);
????????}
????????private?void?button_tj_Click(object?sender?EventArgs?e)
????????{
????????????PoolItem?poolItem?=?new?Poo
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2018-03-29?18:39??測試線程池\
?????目錄???????????0??2018-03-29?20:16??測試線程池\bin\
?????目錄???????????0??2018-03-29?20:19??測試線程池\bin\Debug\
?????目錄???????????0??2018-03-29?20:16??測試線程池\bin\Release\
?????文件????????2888??2018-03-29?17:40??測試線程池\Form1.cs
?????文件????????9327??2018-03-29?17:40??測試線程池\Form1.Designer.cs
?????文件????????5817??2018-03-29?17:40??測試線程池\Form1.resx
?????目錄???????????0??2018-03-29?14:31??測試線程池\obj\
?????目錄???????????0??2018-03-29?20:19??測試線程池\obj\Debug\
?????文件????????6878??2018-03-29?20:16??測試線程池\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
?????目錄???????????0??2018-03-29?14:31??測試線程池\obj\Debug\TempPE\
?????文件????????8299??2018-03-29?18:39??測試線程池\pool.cs
?????文件?????????496??2018-03-29?14:31??測試線程池\Program.cs
?????目錄???????????0??2018-03-29?14:31??測試線程池\Properties\
?????文件????????1346??2018-03-29?14:31??測試線程池\Properties\AssemblyInfo.cs
?????文件????????2843??2018-03-29?14:31??測試線程池\Properties\Resources.Designer.cs
?????文件????????5612??2018-03-29?14:31??測試線程池\Properties\Resources.resx
?????文件????????1102??2018-03-29?14:31??測試線程池\Properties\Settings.Designer.cs
?????文件?????????249??2018-03-29?14:31??測試線程池\Properties\Settings.settings
?????文件????????3428??2018-03-29?14:40??測試線程池\測試線程池.csproj
評論
共有 條評論