|
-
Jan 5th, 2009, 06:23 AM
#1
Thread Starter
Frenzied Member
Re: [2008] WaitAll for multiple handles on a STA thread is not supported
The project which contains the code is a Class Library project, however the project it's intended for is a WinForms application. The Application Framework is vital for the application and I don't have the option of disabling it. The project deadline is January 16th, so I'm willing to do whatever it takes to make it work, including rewriting the Class Library in C# if that'll solve the problem.
Can I add the MTAThread attribute to just one class of a project? If so, I'll rewrite the class in C# and append it to a C# project in my solution.
Perhaps there may be a method which doesn't use WaitHandles. Something along the lines of raising an event on the UI thread each time a ThreadPool work item is finished. The event would count how many times it has been raised and after the last work item is finished it would invoke a new method, passing the finished data as an argument. How does that sound?
If it sounds ok, then I'll need some help with raising the event on the UI thread, I think I can do the rest myself.
Please rate helpful ppl's posts. It's the best 'thank you' you can give 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|