This website works better with JavaScript.
Home
Explore
Help
Register
Sign In
SisMaker
/
eGLock
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Projects
0
Releases
0
Wiki
Activity
Browse Source
ft: 说明修改
master
SisMaker
1 year ago
parent
27b4cdf35a
commit
2343eab3a0
1 changed files
with
10 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+10
-0
README.md
+ 10
- 0
README.md
View File
@ -13,3 +13,13 @@ Build
eGLock 基于c++11 atomic
其中要锁的key 不能是列表的字符串 原因是锁表的key会判断是否为list来区分是锁单key 还是锁列表
另外建议锁的key需要通过宏定义来生成 维护时好搜查删改
对于 tryLock和releaseLock的使用应该在try里面使用并在after调用releaseLock,就像这样:
try
true = eGLock:tryLock(KeyOrKeys),
%% doSomeThing
catch C:R:S ->
%% do error
after
:releaseLock(KeyOrKeys)
end.
Write
Preview
Loading…
Cancel
Save