K
Kueishiong Tu
I have a window form application. It requires to retrieve
data from a web site. Since the web request is very time
consuming, so I create a work thread to do the job.
How does the window main form (which is the main thread)
know when the work thread has finished the job so that
it can display the data received on the form? I do not
want to use a global variable since if the main form is
continuously checking for the global variable, it will
not be able to process the window UI events. I try to
raise an event when the work thread's job is done,
but how can the main thread detected this event?
..
data from a web site. Since the web request is very time
consuming, so I create a work thread to do the job.
How does the window main form (which is the main thread)
know when the work thread has finished the job so that
it can display the data received on the form? I do not
want to use a global variable since if the main form is
continuously checking for the global variable, it will
not be able to process the window UI events. I try to
raise an event when the work thread's job is done,
but how can the main thread detected this event?
..