SmartThreadPool

时间:2012-06-15 06:34:28
【文件属性】:

文件名称:SmartThreadPool

文件大小:124KB

文件格式:ZIP

更新时间:2012-06-15 06:34:28

SmartThreadPool 2.0 net

SmartThreadPool netC#中的,可以对线程有新的认识 Smart Thread Pool is a thread pool written in C#. The implementation was first based on Stephan Toub's thread pool with some extra features, but now it is far beyond the original. Here is a list of the thread pool features: The number of threads dynamically changes according to the workload on the threads in the pool. Work items can return a value. A work item can be cancelled if it hasn't been executed yet. The caller thread's context is used when the work item is executed (limited). Usage of minimum number of Win32 event handles, so the handle count of the application won't explode. The caller can wait for multiple or all the work items to complete. Work item can have a PostExecute callback, which is called as soon the work item is completed. The state object, that accompanies the work item, can be disposed automatically. Work item exceptions are sent back to the caller. Work items have priority. Work items group. The caller can suspend the start of a thread pool and work items group. Threads have priority.


【文件预览】:
STPExamples
----WaitForAllExample.cs(792B)
----OnWIGIdleEventExample.cs(766B)
----CatchExceptionExample.cs(904B)
----SimpleExample.cs(678B)
----PriorityExample.cs(793B)
----GetExceptionExample.cs(864B)
----WaitForIdleExample.cs(558B)
----App.ico(1KB)
----WorkItemsGroupExample.cs(747B)
----SuspendedSTPStartExample.cs(768B)
----WaitForAnyExample.cs(846B)
----STPExamples.csproj(5KB)
----AssemblyInfo.cs(2KB)
----SuspendedWIGStartExample.cs(822B)
TestSmartThreadPool.exe
TestSmartThreadPool
----Form1.cs(35KB)
----TestSmartThreadPool.csproj(5KB)
----App.ico(1KB)
----Form1.resx(29KB)
----AssemblyInfo.cs(2KB)
UsageControl
----UsageHistoryControl.resx(6KB)
----UsageControl.cs(8KB)
----UsageHistoryControl.cs(4KB)
----UsageControl.csproj(4KB)
----UsageControl.resx(6KB)
----AssemblyInfo.cs(2KB)
SmartThreadPool.dll
UsageControl.dll
SmartThreadPool
----Interfaces.cs(9KB)
----WorkItemsQueue.cs(15KB)
----WorkItemsGroup.cs(15KB)
----Exceptions.cs(2KB)
----WorkItem.cs(25KB)
----WorkItemInfo.cs(3KB)
----SmartThreadPool.csproj(5KB)
----CallerThreadContext.cs(6KB)
----PriorityQueue.cs(5KB)
----SmartThreadPool.cs(44KB)
----STPStartInfo.cs(2KB)
----WIGStartInfo.cs(3KB)
----STPPerformanceCounter.cs(11KB)
----AssemblyInfo.cs(2KB)
----WorkItemFactory.cs(11KB)
STPTests.dll
STPTests
----TestGetResult.cs(5KB)
----TestWIGWaitForIdle.cs(3KB)
----TestChainedDelegates.cs(2KB)
----TestWIGMultipleWorkItems.cs(6KB)
----TestWIGConcurrency.cs(2KB)
----STPTests.csproj(6KB)
----TestWIGStateDispose.cs(4KB)
----TestWorkItemsGroups.cs(4KB)
----TestWIGChainedDelegates.cs(2KB)
----PermutationGenerator.cs(5KB)
----TestThreadPriority.cs(2KB)
----TestWIGExceptions.cs(2KB)
----TestPriorityQueue.cs(4KB)
----TestStateDispose.cs(4KB)
----TestWIGGetResult.cs(4KB)
----TestExceptions.cs(2KB)
----TestWorkItemsQueue.cs(1KB)
----TestMultipleWorkItems.cs(5KB)
----TestWIGPostExecute.cs(6KB)
----TestWaitForIdle.cs(2KB)
----TestStartSuspended.cs(3KB)
----TestPostExecute.cs(6KB)
----AssemblyInfo.cs(2KB)
SmartThreadPool.sln

网友评论

  • 非常实用呀。确实好用
  • 非常实用呀。用了一段时间。确实好用。
  • 虽然看得慢,但还是很有收获的。