pthreadonce
pthread_once is a synchronization function in POSIX threads (pthreads) that allows a variable to be initialized only once in a multi-threaded program. It provides a way to ensure that a given block of code is executed only once in a program, regardless of the number of threads.
The pthread_once function takes two arguments: the name of the variable to be initialized, and a control
pthread_once is particularly useful in situations where avoiding unnecessary repetition of initialization code is critical. For
pthread_once is a low-level synchronization function that provides a basic building block for more complex synchronization
The pthread_once function is defined in the `pthread.h` header file and is implemented as a POSIX thread