sodium_init() is not thread-safe. Roll your own locks if you need that.