various toy memory locks to prevent race conditions, for lolz