Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A problem when using a worker thread within the user interface thread

Status
Not open for further replies.

Aunthas

Programmer
Oct 8, 2002
7
0
0
TH
I wrote the client-server program that user can send the task to operate at the server and user can stop the task in the server if it takes a long time. So I do the task in worker thread. The problem occur when the socket in the user interface thread receives the stop signal, at that time the worker thread sudddenly stops and causes the error. Is there anyway to solve this problem?

Sorry for my poor english.
Thank you very much for the suggestions.
 
>> So I do the task in worker thread.

That "task" do you do in the worker thread?

>> when the socket in the user interface thread receives
>> the stop signal

You mean a "STOP" protocol message from the server? Or a "Socket Close" message?

perhaps you could post the code where the "socket receives the stop signal".

confused
-pete

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top