In computer programming, a mutual exclusion object (mutex) is a program object that allows multiple program threads to share the same resource, such as file access, but not simultaneously. When a program is started, a mutex is created with a unique name. After this stage, any thread that needs the resource must lock the mutex from other threads while it is using the resource. The mutex is set to unlock when the data is no longer needed or the routine is finished.
Other Forms
When spelled MuTeX, a package of macros for the TeX typesetting system that supports musical notation. MuTeX was written by Andrea Steinbach and Angelika Schofer, as a master’s thesis at Rheinische Friedrich-Wilhelms University.