|
|
Best way to prevent Main from exiting
|
|
08/01/2008 9:27 AM
post11325
|
Best way to prevent Main from exiting
Hello,
I have an application that creates a dispatch thread pool and several "services" by using message_attach to add message
handlers to the system.
Once this is done, there is no main loop since the dispatch handles the message events.
What is the best way to prevent Main from exiting after the setup is done.
Can you use pthread_join() on a thread pool? (I don't see how)
Currently, I create a while(1) loop that uses sleep(5000), but this is not the best use of system resources.
Thoughts?
Thanks,
- Mike
|
|
|
|
|