STTNet 0.7.0
Loading...
Searching...
No Matches
stt::file::FileThreadLock Struct Reference

记录文件和线程关系的结构体 More...

#include <sttnet.h>

Public Member Functions

 FileThreadLock (const std::string &loc, const int &threads)
 这个结构体的构造函数
 

Public Attributes

std::string loc
 文件路径
 
int threads
 记录文件正在被多少个线程使用
 
std::mutex lock
 此文件的锁
 

Detailed Description

记录文件和线程关系的结构体

Note
用于在后续类中使用,保证线程安全

Constructor & Destructor Documentation

◆ FileThreadLock()

stt::file::FileThreadLock::FileThreadLock ( const std::string & loc,
const int & threads )
inline

这个结构体的构造函数

Parameters
loc传入路径构造结构体对象
threads传入文件被多少个线程使用的数量构造结构体对象

Member Data Documentation

◆ loc

std::string stt::file::FileThreadLock::loc

文件路径

◆ lock

std::mutex stt::file::FileThreadLock::lock

此文件的锁

◆ threads

int stt::file::FileThreadLock::threads

记录文件正在被多少个线程使用


The documentation for this struct was generated from the following file: