YSTest: ystdex::threading 命名空间参考

YSTest PreAlpha_b900_20201012 The YSLib Test Project

类 | 类型定义 | 变量
ystdex::threading 命名空间参考

在单线程环境和多线程环境下都可用的线程同步接口。 更多...

## 类

struct | adopt_lock_t
struct | defer_lock_t
class | lock_base
| 锁基类：可适配独占锁和共享锁。 更多...
class | lock_base< _tMutex, false, _tReference >
class | lock_guard
class | lock_guard< _tMutex, false, _tReference >
class | lockable_adaptor
class | shared_lock
class | shared_lockable_adaptor
struct | try_to_lock_t
class | unique_lock
class | unlock_delete
| 解锁删除器。 更多...

## 类型定义

template<typename _type , class _tMutex = single_thread::mutex, class _tLock = single_thread::unique_lock<_tMutex>>
using | locked_ptr = std::unique_ptr< _type, unlock_delete< _tMutex, _tLock > >
| 独占所有权的锁定指针。 更多...

## 变量

const struct ystdex::threading::defer_lock_t | defer_lock
const struct ystdex::threading::try_to_lock_t | try_to_lock
const struct ystdex::threading::adopt_lock_t | adopt_lock

## 详细描述

在单线程环境和多线程环境下都可用的线程同步接口。

自从
  build 551

## 类型定义说明

## ◆ locked_ptr

template<typename _type , class _tMutex = single_thread::mutex, class _tLock = single_thread::unique_lock<_tMutex>>

using ystdex::threading::locked_ptr = typedef std::unique_ptr<_type, unlock_delete<_tMutex, _tLock> >

独占所有权的锁定指针。

自从
  build 551

在文件 pseudo_mutex.h 第 1083 行定义.

## 变量说明

## ◆ adopt_lock

const struct ystdex::threading::adopt_lock_t ystdex::threading::adopt_lock

## ◆ defer_lock

const struct ystdex::threading::defer_lock_t ystdex::threading::defer_lock

## ◆ try_to_lock

const struct ystdex::threading::try_to_lock_t ystdex::threading::try_to_lock