extended code to advanced input functionality
This commit is contained in:
parent
58cf91a06d
commit
0fc6c74996
8 changed files with 34 additions and 27 deletions
|
@ -4,8 +4,8 @@
|
|||
int counter = 0;
|
||||
|
||||
void* increment(void* arg) {
|
||||
for (int i = 0; i < 100000; i++) {
|
||||
counter++;
|
||||
for (int i = 0; i < 1000000; i++) {
|
||||
counter++; // No synchronization, will lead to race condition
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue