--- In [email protected], "entropyreduction" 
<alancampbelllists+ya...@...> wrote:
>
> Sorry, it's been a long time since I wrote that code, so I forget rationale.  
> I think I tried it without thread and powerpro locked up.
> So I went and looked at example COM  code lying about, found a lot of work 
> was getting done on extra threads, tried that, worked.
>

Ah, I vaguely recalled that you once said that.
Anyway, using new thread (at each object creation, right?) sounds scary to me. 
How do you manage to clean-up those threads at unload time? How you call the 
created objects, which reside in the different thread(s) from the calling 
thread, i.e. PP's main thread? Thread switch or marshaling or etc?
I can imagine one scenario which crashes PP at com.unload(). In which thread do 
you call CoUninitialize()? It should be the new-thread, but if mistakenly call 
it in the main-thread, it could crash PP.

Reply via email to