White RoomNEW

Locked Forever

std::mutex m;

std::vector<int> load(const char* path) {
    m.lock();
    std::FILE* f = std::fopen(path, "rb");
    auto data = parse(f);        // may throw std::runtime_error
    std::fclose(f);
    m.unlock();
    return data;
}

parse throws on a malformed file. What is the state of the process afterwards?