Class readwrite_guard

Class Documentation

class legion::core::async::readwrite_guard

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

Note

Read-Write operations cannot happen simultaneously and will wait for each other. Read-Write operations will also wait for any Read-only operations to be finished. legion::core::async::rw_spinlock

Public Functions

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

Creates read-write guard and locks for Read-Write.

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

RAII style unlocks lock from Read-Write.

readwrite_guard &operator=(readwrite_guard&&) = delete