Next Previous Up Top Contents Index

3.5.1 Mutual exclusion primitives

critical

Function

Syntax

critical (mutex-list, f) a -> value 

Description

Evaluates a function call between a wait and a signal, with appropriate behavior on exceptions.

This function first waits for the mutexes in mutex-list. Then it applies f to a. Then it signals that the mutexes in mutex-list are free. Finally, it returns the result of the application of f to a.

The mutex-list is of type mutex list; f is a function (type 'a -> 'b) and a must be a valid argument to f.


MLWorks Reference Manual version 2.0 - 29 Jul 1998

Next Previous Up Top Contents Index

Generated with Harlequin WebMaker