How to implement background process

How to run a background process in C# ? My requirement is to trigger a process from application which will run more than 30 mins . I have to show the updated status of process on screen every now and then. Could anyone suggest me a option in implementing this ? I have used WCF service in app.

Answers


My options are:

1. Use a backgroundworker process and perform the long running operation, mean while use a loading image to display work is in progress. Since you are using wcf service to get response back, it is difficult to show actual work progress.

2. Use ThreadPool.QueueUserWorkItem and delegate the long running process to threadpool threads. Then using Dispatcher.BeginInvoke update the UI.


Need Your Help

Are php resources passed by reference?

php parameter-passing

I discovered today that in addition to objects and primitives, PHP has resources. The documentation states that by default php passes names by value. But we know that in PHP 5, objects are referenc...

Pushing a new viewcontroller from a tableview in a tab bar app

iphone ios uitableview uitabbarcontroller pushviewcontroller

I've got an app with a UITabBarController that controls several UIViewControllers. Within that controller there is a UITableViewController. I'm trying to figure out how I can select a row on my tab...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.