G
Guest
I'm working on a project where I need to add an existing chat program as a
plugin. The framework I'm using requires that I write a Control that
inherits from their own custom control. In the constructor for this control
I start up the threads that listen to the server. After I start my second
thread the program deadlocks, but currently the threads are not locking on
anything. I have found that if I place a timer with an interval of 500
ticks, start the timer in the constructor, and begin the worker threads in
the Tick event handler, the program works. Needless to say I'm not happy
with the above solution. Is there something I need to watch out for before
starting a background thread in a control? If so what event should I
subscribe to?
Thanks.
plugin. The framework I'm using requires that I write a Control that
inherits from their own custom control. In the constructor for this control
I start up the threads that listen to the server. After I start my second
thread the program deadlocks, but currently the threads are not locking on
anything. I have found that if I place a timer with an interval of 500
ticks, start the timer in the constructor, and begin the worker threads in
the Tick event handler, the program works. Needless to say I'm not happy
with the above solution. Is there something I need to watch out for before
starting a background thread in a control? If so what event should I
subscribe to?
Thanks.