lock (C++)

A mutex is a programming flag used to grab and release an object.

A mutex is a programming flag used to grab and release an object. When data are acquired that cannot be shared or processing is started that cannot be performed simultaneously elsewhere in the system, the mutex is set to lock (typ- ically zero), which blocks other attempts to use it. The mutex is set to unlock when the data are no longer needed or the routine is finished.

todo