use with block for acquire/release semantics