NewLang Project
Yet another programm language
|
#include <variable.h>
Public Member Functions | |
Sync (RefType type, const std::chrono::milliseconds &timeout_duration=SyncTimeoutDeedlock) | |
RefType | GetRefType () const |
std::thread::id | GetThreadId () const |
bool | SyncLock (bool edit_mode=true, const std::chrono::milliseconds &timeout_duration=Sync::SyncTimeoutDeedlock) |
bool | SyncUnLock () |
virtual | ~Sync () |
Static Public Member Functions | |
static std::shared_ptr< Sync > | CreateSync (const TermPtr &term) |
static std::shared_ptr< Sync > | CreateSync (const std::string_view ref) |
Static Public Attributes | |
static constexpr std::chrono::milliseconds | SyncTimeoutDeedlock = std::chrono::milliseconds(5000) |
static constexpr std::chrono::seconds | SyncWithoutWait = std::chrono::seconds(0) |
Protected Attributes | |
const RefType | m_type |
const std::thread::id | m_thread_id |
const std::chrono::milliseconds & | m_timeout |
std::variant< std::monostate, std::shared_timed_mutex, std::recursive_timed_mutex > | m_sync |
std::shared_ptr< Variable > | m_data |
Поле данных для использования в классе VariableTaken, чтобы уменьшить размер класса Variable. | |
Friends | |
class | VariableTaken |
Класс захвата/освобождения объекта межпотоковой синхронизации Хранит опции захвата и содерит поле для ссылкы на защищаемую переменную.
Definition at line 138 of file variable.h.
|
inline |
Definition at line 155 of file variable.h.
References ASSERT, newlang::LiteSingle, newlang::LiteSingleConst, newlang::LiteThread, newlang::LiteThreadConst, LOG_RUNTIME, m_sync, m_type, newlang::SyncMono, newlang::SyncMonoConst, newlang::SyncMulti, newlang::SyncMultiConst, and newlang::Value.
|
inlinevirtual |
Definition at line 213 of file variable.h.
|
static |
Definition at line 44 of file variable.cpp.
References newlang::RefTypeFromString(), newlang::Shared, newlang::SharedConst, and newlang::Value.
|
inline |
Definition at line 172 of file variable.h.
References m_type.
|
inline |
Definition at line 176 of file variable.h.
References m_thread_id.
|
inline |
Definition at line 180 of file variable.h.
References ASSERT, newlang::LiteSingle, newlang::LiteSingleConst, LOG_RUNTIME, m_sync, m_thread_id, m_timeout, m_type, newlang::SyncMono, newlang::SyncMonoConst, newlang::SyncMulti, newlang::SyncMultiConst, and SyncTimeoutDeedlock.
|
inline |
Definition at line 199 of file variable.h.
References ASSERT, newlang::LiteSingle, newlang::LiteSingleConst, m_sync, m_thread_id, m_type, newlang::SyncMono, newlang::SyncMonoConst, newlang::SyncMulti, newlang::SyncMultiConst, and newlang::Value.
|
friend |
Definition at line 140 of file variable.h.
|
protected |
Definition at line 142 of file variable.h.
Referenced by GetRefType(), Sync(), SyncLock(), and SyncUnLock().
|
protected |
Definition at line 143 of file variable.h.
Referenced by GetThreadId(), SyncLock(), and SyncUnLock().
|
protected |
Definition at line 144 of file variable.h.
Referenced by SyncLock().
|
mutableprotected |
Definition at line 146 of file variable.h.
Referenced by Sync(), SyncLock(), and SyncUnLock().
|
protected |
Поле данных для использования в классе VariableTaken, чтобы уменьшить размер класса Variable.
Definition at line 148 of file variable.h.
|
staticconstexpr |
Definition at line 152 of file variable.h.
Referenced by SyncLock().
|
staticconstexpr |
Definition at line 153 of file variable.h.