DotNet版 - one question about threading |
|
|
|
|
|
f*****e 发帖数: 5177 | 1 I have a third party dll which need to be initialized in my class. that dll
provides only async initialization solution. That is the dll provide a
constructor which returns immediately with newly created instance. Then it
begins to initialize its internal components. After
finishes, it fires OnReady event. I have to wait to receive that event in
order to get full functionalities. Here is an example:
Class1
{
private ThirdPartyComp theComp;
public void Initialize()
{
theComp | c**e 发帖数: 2558 | 2 read 'programming .net components'
dll
Or
【在 f*****e 的大作中提到】 : I have a third party dll which need to be initialized in my class. that dll : provides only async initialization solution. That is the dll provide a : constructor which returns immediately with newly created instance. Then it : begins to initialize its internal components. After : finishes, it fires OnReady event. I have to wait to receive that event in : order to get full functionalities. Here is an example: : Class1 : { : private ThirdPartyComp theComp; : public void Initialize()
| b****u 发帖数: 1027 | 3 use WaitHandle. (MannualResetEvent) |
|
|
|
|
|