Skip to content

Commit 9056434

Browse files
Merge pull request #447 from m-ou-se/synchapi-no-destroy
Clarify destruction of SRW locks and condition variables.
2 parents ec20452 + 722cbf5 commit 9056434

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

sdk-api-src/content/synchapi/nf-synchapi-initializeconditionvariable.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,9 @@ Threads can atomically release a lock and enter the sleeping state using the <a
7070

7171
Condition variables are user-mode objects that cannot be shared across processes.
7272

73-
A condition variable cannot be moved or copied. The process must not modify the object, and must instead treat it as logically opaque. Only use the condition variable functions to manage condition variables.
73+
A condition variable cannot be moved or copied while in use. The process must not modify the object, and must instead treat it as logically opaque. Only use the condition variable functions to manage condition variables.
7474

75+
A condition variable with no waiting threads is in its initial state and can be copied, moved, and forgotten without being explicitly destroyed.
7576

7677
#### Examples
7778

sdk-api-src/content/synchapi/nf-synchapi-initializesrwlock.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ A pointer to the SRW lock.
6868

6969
An SRW lock must be initialized before it is used. The InitializeSRWLock function is used to initialize a SRW lock dynamically. To initialize the structure statically, assign the constant <b>SRWLOCK_INIT</b> to the structure variable.
7070

71-
An SRW lock cannot be moved or copied. The process must not modify the object, and must instead treat it as logically opaque. Only use the SRW functions to manage SRW locks.
71+
An SRW lock cannot be moved or copied while in use. The process must not modify the object, and must instead treat it as logically opaque. Only use the SRW functions to manage SRW locks.
7272

73-
SRW locks do not need to be explicitly destroyed.
73+
An unlocked SRW lock with no waiting threads is in its initial state and can be copied, moved, and forgotten without being explicitly destroyed.
7474

7575
## -see-also
7676

0 commit comments

Comments
 (0)