use mutable autolocks/depreciate lock/unlock
updated for windows
mutable crits