Convert CRYPTO_LOCK_UI to new multi-threading API