R
Robert Wilson
Hi,
I am running a separate thread in order to be able to poll devices on a
MODBUS RTU network. I create a thread and look at the ThreadObj.IsAlive
flag, and this work ok. I then might have to come back later to the
thread an re run the task contained within it. When I come to re-run
the thread, when I call to ThreadObj.Start it throws an exception.
Ordinarily in C++ I would delete the ThreadObj and then re-create one
with the oThread = new Thread(new ThreadStart(SearchThread)); call.
Seeing as I cannot do my own garbage collection when I need to wondered
if anyone had any comments?
Most of my experience is C++/MFC and am now porting a current app to C#
in order to better my understanding of the langauge.
Thanks,
Rob.
I am running a separate thread in order to be able to poll devices on a
MODBUS RTU network. I create a thread and look at the ThreadObj.IsAlive
flag, and this work ok. I then might have to come back later to the
thread an re run the task contained within it. When I come to re-run
the thread, when I call to ThreadObj.Start it throws an exception.
Ordinarily in C++ I would delete the ThreadObj and then re-create one
with the oThread = new Thread(new ThreadStart(SearchThread)); call.
Seeing as I cannot do my own garbage collection when I need to wondered
if anyone had any comments?
Most of my experience is C++/MFC and am now porting a current app to C#
in order to better my understanding of the langauge.
Thanks,
Rob.