
with_mutex(+Mutex, +Goal)

   Equivalent to once(Goal) but with mutual exclusion

Arguments
   Mutex               Mutex handle or alias
   Goal                A callable term

Type
   library(threads)

Description

    Equivalent to the with_mutex/2 built-in predicate, but also accepts
    an atomic mutex alias.


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

See Also
   mutex_create / 1, mutex_create / 2, with_mutex / 2
