I've just created a class that uses winsock to handle network communication. Now there's a method called "fillQueue" which is defined like this:
Expand|Select|Wrap|Line Numbers
- void fillQueue(NetworkQueueTS& nq);
Now when I want to start an additional thread at the beginning of my app, it needs to be something like a "fire and forget" function call. The thread must be created and needs to live until the program ends.
I've tried the following:
Expand|Select|Wrap|Line Numbers
- boost::thread whatever(mySock->fillQueue, nq);
- whatever.detach();
TIA