Lock lib using Dekker's method + usage example.