AI engineering glossary · Computing foundations

What is mutex?

Mutex (also called Lock): A mutual-exclusion lock that allows only one thread at a time to enter a protected section of code. Threads that arrive while it is held wait, which prevents simultaneous changes to shared data.

Level: advancedTopic: Computing foundations

Mutex: an example

Wrapping a shared counter update in a lock makes sure two threads cannot change it at the same instant.

Related terms

More Computing foundations terms

Where you learn it

Mutex is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.