https://cirrus-ci.com/task/5603470202896384?logs=ci#L2681
->NotifyUnload();
    
    .reset();
    {
        WAIT_LOCK(g__release_mutex, lock);
        while (g_unloading__set.count(name) == 1) {
            g__release_cv.wait(lock);
        }
    }
}
 {
stdshared_ptr<CWallet> LoadWalletInternal(WalletContext& context, const stdstring& name, stdoptional<bool> load_on_start, const DatabaseOptions& options, DatabaseStatus& status, bilingual_str& error, stdvector<bilingual_str>& warnings)
{
    try {
        stdunique_ptr<WalletDatabase> database = MakeWalletDatabase(name, options, status, error);
        if (!database) {
            error = Untranslated("Wallet file verification failed.") + Untranslated(" ") + error;
            return nullptr;
        }
        context.chain->initMessage(_("Loading …").translated);
        const stdshared_ptr<CWallet>  = CWalletCreate(context, name, stdmove(database), options.create_flags, error, warnings);
        if (!) {
            error = Untranslated("Wallet loading failed.") + Untranslated(" ") + error;
            status = DatabaseStatusFAILED_LOAD;
            return nullptr;
        }
        NotifyWalletLoaded(context, );
        AddWallet(context, );