Class readonly_guard

Class Documentation

class legion::core::async::readonly_guard

RAII guard that uses ::async::rw_spinlock to lock for read-only.

Note

Read-only operations can happen simultaneously without waiting for each other. Read-only operations will only wait for Read-Write operations to be finished. legion::core::async::rw_spinlock

Public Functions

inline readonly_guard(const rw_spinlock &lock, wait_priority priority = wait_priority::real_time)

Creates readonly guard and locks for Read-only.

readonly_guard(const readonly_guard&) = delete
inline ~readonly_guard()

RAII style unlocks lock from Read-only.

readonly_guard &operator=(readonly_guard&&) = delete