Skip to content

Commit 8cfdf53

Browse files
author
Amanda Butler
authored
Copy edit ConditionVariable.md
Make minor copy edits.
1 parent e1baf41 commit 8cfdf53

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/reference/api/rtos/ConditionVariable.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
## ConditionVariable
22

3-
The ConditionVariable class provides a mechanism to safely wait for or signal state changes. A common scenario when writing multi threaded code is to protect shared resources with a mutex and then release that mutex to wait for a change of that data. If this is not carefully done this can lead to race condition in the code. A condition variable provides a safe solution to this problem by handling the wait for a state change along with releasing and acquiring the mutex automatically during this waiting period.
3+
The ConditionVariable class provides a mechanism to safely wait for or signal state changes. A common scenario when writing multithreaded code is to protect shared resources with a mutex and then release that mutex to wait for a change of that data. If you do not do this carefully, this can lead to a race condition in the code. A condition variable provides a safe solution to this problem by handling the wait for a state change, along with releasing and acquiring the mutex automatically during this waiting period.
44

55
### ConditionVariable class reference
66

77
Coming soon
88

99
### ConditionVariable example
1010

11-
Below is an example of ConditionVariable usage, where one thread is generating events every 1s, and the second thread is waiting for the events and executing some action.
11+
Below is an example of ConditionVariable usage, where one thread is generating events every 1s, and the second thread is waiting for the events and executing an action.
1212

1313
```
1414
#include "mbed.h"

0 commit comments

Comments
 (0)