The Parallel.NET component provides you with a simple and robust way of getting your .NET applications to perform regular tasks at configurable intervals. There is no interference to other aspects of the application including the UI or users.
Features
- Execute tasks at configurable intervals
- Run multiple tasks at different intervals using 1 ParallelScheduler
- Configure whether background tasks use the ThreadPool or run on their own thread
- Specify whether the task should run infinitely or for a specified number of times
- Add observers for any background task having the observers alerted each time the task runs
- Allow the observers to manipulate the output from the task that was run
- Specify how the observers will execute – Sequential or Concurrently
- Exception handling just in case a task does not consume its own exceptions
Uses
- Loading news feeds
- Clean-up operations
- Sending emails without reducing the responsiveness of the UI
- Monitoring internal and external resources
- Updating devices or other services with new information
- Refresh your data sources from external/internal web services
- Monitor database tables for changes or new information
- Monitor inboxes for new emails
- Process video, images, and other multimedia files
- Send large files
Tasks that take a long time including tasks that are processor intensive, hard disk intensive or task that access external resources such as Web/WCF services, databases (in some cases), news feeds, etc. can be run in the background. Once these tasks are completed the observers will be notified and then they can perform their work which can include updating the UI, notifying users of changes & updates, etc.
Technologies
This component is built using the .NET 2.0 Framework which means in can be used in all .NET applications that are using the 2.0 framework or newer. This includes .NET 2.0, 3.0, 3.5, 4.0, & 4.5. This component can be used all types of .NET applications including:
- Console
- Windows Forms
- WPF
- ASP.NET WebForms
- ASP.NET MVC
- Windows Services
- Web Services (XML/WCF)
- Silverlight
Reliability
The component also ensures that many pitfalls are not encountered including:
- No Deadlocks
- No Memory leaks – clean up through the dispose method & consider problems such as the lapsed listener
- No Exceptions leaks – Exception handling through to ensure undesired termination of the application does not occur
- ASP.NET ThreadPool & Service Unavailable – Gives control of whether ThreadPool threads are used (by default no). This ensures that threads are not taken away from high availability ASP.NET applications causing the dreaded “Service Unavailable” message
- Task/Background work structure – Flexible mechanism for creating complex background operations
- Strong name signed – Allows referencing in other application that are strong named signed & also installed into the GAC
You can immediately use this within your application and is very simple. Ask any questions or suggest features!








