|
-
April 4th, 2002, 10:59 PM
#1
Callback Function Problem
I'm using WINSNMP API to develop a SNMP-based tool. I have encounter some problem with the CALLBACK funtion. As far as i concern, each CALLBACK funtion will create a new thread, but some of the threads create by the callback will not end. It appears to me as a blocking situation. I would like to ask how can force the callback functions(threads) to end?
-
April 5th, 2002, 02:45 AM
#2
Re: Callback Function Problem
There are two types of threads, worker threads and user-interface threads.
Worker threads perform a task then end.
User interface threads have message pumps and remain active until they get a WM_QUIT message, just like applications.
But only worker threads use a callback function. However this callback function could contain synchronisation functions (WaitForSingleObject, WaitForMultipleObjectsEx) and could contain a loop, so they do not actually terminate until such-and-such event has happened.
I don't know exactly what the situation is with your model.
The best things come to those who rate
-
April 5th, 2002, 08:01 PM
#3
Re: Callback Function Problem
for my situation...its up to the implementation(Winsnmp API) to close the thread...there is something i want to verify...is the callback function a thread function itself?or its just a function that is called by a worker thread in background?
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
|