views:

904

answers:

3

Just wondering, is there any Multithreading framework out there?

Currently I am developing a WinForm application using Microsoft Enterprise Library framework. In this application I want to add threading functionality when running processes, so I can offload processes that I want to a separate thread. Moreover, I need to be able to monitor all the threads that I have created and their progress status.

So... is there any framework/pattern/best practices just to manage threads out there?

Thanks a heap.

+1  A: 

There are multiple ways to do threading in .NET.

Brian Rasmussen
+8  A: 

Consider Retlang. It's a nice abstraction for threading and integrates with WinForms in such a way that you can easily fire actions that will be invoked on your form thread. It also implements various publish/subscribe mechanisms and uses interfaces throughout the library for easy mock testing and extensibility.

Definitely set aside an hour to look at the examples and unit tests, and build some small test apps with it. It's a joy to use with and will save you weeks of work.

Retlang provides a concurrency solution that is quite different from basic locking solutions, Parallel FX, or the .NET thread pool. With Retlang, application components exchange messages asynchronously rather than using low level locking and blocking api's. Messages are delivered sequentially to prevent thread races or object synchronization. It is similar in design to event-based actors in Scala.

anthony
I think this one might works, I'll look into it. Thanks anthony.
dkartopr
A: 

See Jeffrey Richter’s Power Threading Library

P.K