开发者

Load an assembly on a separate thread?

开发者 https://www.devze.com 2023-02-19 10:20 出处:网络
I have a .net assembly (from BMC remedy, if that helps), that seems to be defective by design regarding multithreading. It seems to initialize all objects on the main (UI) thread, regardless of the th

I have a .net assembly (from BMC remedy, if that helps), that seems to be defective by design regarding multithreading. It seems to initialize all objects on the main (UI) thread, regardless of the thread that actually constructs them, and then the usual cross-thread problems ensue.

Is the开发者_运维百科re any way that I can load the assembly on a separate thread?


I'm posting this an answer, because I think I got your point now:

On which thread a method is executed depends on the caller of the method, not on the thread its instance was created on.

So to prevent your UI thread from freeezing you have to start the operation on another thread. There are tons of resources about this topic on the web.

0

精彩评论

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