|
-
Feb 2nd, 2002, 03:45 PM
#1
Thread Starter
Frenzied Member
Closing A Thread (Multithreading)
I have created a thread using _beginthread(), as shown below:
Code:
unsigned long m_thread;
m_thread = _beginthread(control, 0, 0);
the standard way of closing threads created like this is via _endthread()
the only problem is i want to close this thread from another thread, so i cannot us that function as it ends the thread that its called from.
How can i do such ?
-
Feb 3rd, 2002, 04:38 AM
#2
Thread Starter
Frenzied Member
Well my problem is that i have a thread that gets started fine. THis thread then uses winsock, the problem is that winsock can freeze up and loop for ages thus the thread doesnt stop.
I need to be able to close the thread when it breaks like this.
Is there any way i can get a handle to the thread to then use CloseHandle() ??
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|