Skip to content

Engine → Core

file_lock.h

An exclusive cross-process lock on one file. Move-only; destroying a held lock releases it. Threading: one object belongs to one thread at a time; distinct objects may be used from any thread.

Classes

File Description
file_lock An exclusive cross-process lock on one file. Move-only; destroying a held lock releases it. Threading: one object belongs to one thread at a time; distinct objects may be used from any thread.

Enumerations

file_lock_open

enum class file_lock_open : u8 {
    CREATE,     // create an empty file when missing; an existing file is never truncated
    EXISTING    // NOT_FOUND when missing; nothing is created
};

Whether try_acquire creates the file.