https://bbagwang.com/posts/game-server-development/5-lock-implementation-theory/