I haven't actually tested the library in a while now, and Nim has a habit of changing. Last time I did check was with Nim 1.2.6, and we're now up to 1.4.6 so things may have changed.
I would also read the pthread docs the same way personally, with `deinitLock` being unsafe if `initLock` hasn't been called.