Have you looked at the new Asynch stuff?
http://msdn.microsoft.com/en-us/vstudio/async.aspx>Hi all,
>
>I am making some changes to an application to help with performance. On the startup currently there are lots of objects and initialization that needs to be performed and currently this is blocking the UI thread. I am moving these things to a Background worker thread so the UI can continue to load and present. The question is I am looking for an appropriate pattern or design that I could implement to know if the user attempts something that requires the Background worker to be done before the worker is completed it would wait. This means either the worker is done and the user action could continue; or the user attempt is waited pending the completion of the worker thread. In addition, if the user exits, I would need to cancel the worker thread if it is still running.
>
>I have experimented with a couple of mechanisms but thinking there may already be some design pattern for this.
>Thanks
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer