M
Michael C
Hi all,
I recently ran across some code for a splash page sample at
thecodeproject.com. It's a nice piece of code that gradually fades out and
runs on a separate thread. Apart from the issues with it updating the UI
directly from a worker thread that I was able to spot and fix (thanks to
some previous posts on the subject by Mr. Skeet!), I found something else
odd. To stop the worker thread from running, the programmer used the
statement myThread = null; This doesn't seem right to me, but I just wanted
to be sure before I go changing it. Is this the correct way to stop a
worker thread? Will it have any adverse effects on the system? What about
using Thread.Join() instead? Just wondering...
Thanks,
Michael C., MCDBA
I recently ran across some code for a splash page sample at
thecodeproject.com. It's a nice piece of code that gradually fades out and
runs on a separate thread. Apart from the issues with it updating the UI
directly from a worker thread that I was able to spot and fix (thanks to
some previous posts on the subject by Mr. Skeet!), I found something else
odd. To stop the worker thread from running, the programmer used the
statement myThread = null; This doesn't seem right to me, but I just wanted
to be sure before I go changing it. Is this the correct way to stop a
worker thread? Will it have any adverse effects on the system? What about
using Thread.Join() instead? Just wondering...
Thanks,
Michael C., MCDBA