添加注释

This commit is contained in:
2024-11-24 17:55:04 +08:00
parent 06193c5f7d
commit aa2e2040dd

View File

@@ -37,6 +37,7 @@ namespace ling {
shared_mutex &operator=(const shared_mutex &) = delete;
void setResource(const T &&value) {
//改变持有的资源之前,先获得独占锁
ResourceCompletely<T> lock_completely = lock();
this->resource = value;
}