is a background worker in a controller async?

Inside an asp.net mvc 2 controller, I have the following code:

using (BackgroundWorker worker = new BackgroundWorker())
                        {
                            worker.DoWork += new DoWorkEventHandler(blah);
                            worker.RunWorkerAsync(var);
                        }

My question is: is this code async, meaning it launches a new thread and the controller returns the view while 'blah' is executing in parallel?

If not, how would I achieve these results?

5
задан rksprst 24 August 2010 в 22:47
поделиться