Another possibility is to extend locks to accept "on-release" actions (closures), so commitctx can add such an action to the lock (with new functions like wlockaddaction... gotta love that we can't use _, so easy to read ;-)). This would decouple things. /Sune