A library for creating and verifying cancel locks