79701748

Date: 2025-07-15 08:21:16
Score: 1
Natty:
Report link

In pthread, it provides an indirect way.

static bool isSingleThreaded = true ;
static pthread_once_t onceControl = PTHREAD_ONCE_INIT ;

void MarkMultiThreaded()
{
    isSingleThreaded = false ;
}

void CheckThreadStatus()
{
    pthread_once( & onceControl , MarkMultiThreaded ) ;
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: YUKI N