summaryrefslogtreecommitdiffhomepage
path: root/proto-ft/mutex.hpp
blob: f92a14bf3fa9308afb92651cbb3b6b9c8f99706e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#pragma once

class check_for_first_run final
{
    bool checked_for_first_run;
    bool is_first_instance;
    bool enabled;
    
    void try_exit();
public:
    check_for_first_run();
    bool is_first_run();
    void set_enabled(bool flag);
    void try_runonce();
    ~check_for_first_run();
};