开发者

How does the BackgroundWorker class fire its events on the UI thread?

开发者 https://www.devze.com 2022-12-15 09:09 出处:网络
I\'m in the process of writing a asynchronous-operation manager somewhat similar to the BackgroundWorker class. I know that the BackgroundWorker does some internal vo开发者_JAVA技巧odoo (using the Asy

I'm in the process of writing a asynchronous-operation manager somewhat similar to the BackgroundWorker class. I know that the BackgroundWorker does some internal vo开发者_JAVA技巧odoo (using the AsyncOperation class, from what I've read) to fire its events on the thread that created the BackgroundWorker, which is typically a UI thread.

My question is: what voodoo is necessary for events to get fired on a specific thread like the BackgroundWorker does?


It is using SynchronizationContext Class

0

精彩评论

暂无评论...
验证码 换一张
取 消