recently I have been learning the source code of muduo, and I see a method in the Thread class
void runInThread()
{
*tid_ = muduo::CurrentThread::tid();
tid_ = NULL;
latch_->countDown();
latch_ = NULL;
}
I would like to ask, why did you just pass the calculated tid value to the * tid_ pointer and set tid_ to NULL? Are there any programming skills here? I don"t understand this part, so I"d like to consult my predecessors.