[ Control | The ECLiPSe Built-In Predicates | Reference Manual | Alphabetic Index ]

# mutex_init(+MutexId)

Initialise the mutual exclusion lock MutexId

MutexId
  Atom.

## Description

This built-in is used in parallel programs in connection with mutex/2 to implement mutual exclusion between parallel workers.

### Modes and Determinism

- mutex_init(+) is det

### Modules

This predicate is sensitive to its module context (tool predicate, see @/2).

### Exceptions

(4) instantiation fault
  MutexId is not instantiated
(5) type error
  MutexId is not an atom

## See Also

mutex / 2