INIT_GLOBAL_MUTEX

Static INIT_GLOBAL_MUTEX 

Source
static INIT_GLOBAL_MUTEX: Mutex<()>
Expand description

Serializes Database::open + migrations on the on-disk file. Without this, many threads can pass the GLOBAL_DB empty check at once and run migrate() in parallel against the same path, which triggers SQLite database is locked (seen on multi-core CI runners).