Archived
This forum has been archived. Please start a new discussion on GitHub.
Question about thread
I want to build a DLL and then any application can invoke the APIs in the dll. Now My question is how can I implement a thread in which one Api would to be called every minute in the DLL.the API is invoke one methos in the server.
Help me!
Help me!
0
Comments
-
Assuming you use the IceUtil thread class (see the "Threads and Concurrency with C++" chapter in the Ice book) , it's very simple. Your run function could do something like:
IceUtil::Mutex::Lock lock(_mutex);
while(!_done)
{
callMyAPI();
_condVar.timedWait(lock, IceUtil::Time::seconds(60));
}
Cheers,
Bernard0