Skip to content

Commit 0758130

Browse files
committed
Update README.md
fixed
1 parent b68e320 commit 0758130

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,20 @@ To acquire a lock:
2020
CLock my_lock;
2121
bool flag = dlm->Lock("my_resource_name", 1000, my_lock);
2222
or(will alway hold the lock until release it):
23+
2324
CLock my_lock;
2425
bool flag = dlm->ContinueLock("my_resource_name", 1000, my_lock);
2526

2627
Where the resource name is an unique identifier of what you are trying to lock and 1000 is the number of milliseconds for the validity time.
2728

2829
The returned value is false if the lock was not acquired (you may try again), otherwise an class representing the lock is returned, having three keys:
2930

30-
class CLock {
31-
public:
32-
int m_validityTime; => 9897.3020019531 // 当前锁可以存活的时间, 毫秒
33-
sds m_resource; => my_resource_name // 要锁住的资源名称
34-
sds m_val; => 53771bfa1e775 // 锁住资源的进程随机名字
35-
};
31+
class CLock {
32+
public:
33+
int m_validityTime; => 9897.3020019531 // 当前锁可以存活的时间, 毫秒
34+
sds m_resource; => my_resource_name // 要锁住的资源名称
35+
sds m_val; => 53771bfa1e775 // 锁住资源的进程随机名字
36+
};
3637

3738
validity, an integer representing the number of milliseconds the lock will be valid.
3839
resource, the name of the locked resource as specified by the user.

0 commit comments

Comments
 (0)