Code:
class worker
{
public:
bool start()
{
// Create a thread here (if succeeded, the thread will be in infinite loop),
// and should wait for some events, eg. succeeded event and
// failed event, the events should be set in the thread. So, I can determine the
// return value of this function. How to accomplish this?
}
}