a single-function package that constructs a function gaining exclusive access to some shared resource