Commit 8e3e42b
committed
race condition: access to lastStamp outside of lock
lastStamp was assigned to stamp outside the lock, which could have meant
that stamp was assigned the same value if multiple threads were creating
Var objects simultaneously. Moved it into a function to ensure access
was limited to Interlocked function.1 parent 641bb41 commit 8e3e42b
1 file changed
+6
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
95 | 94 | | |
96 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
97 | 100 | | |
98 | 101 | | |
99 | | - | |
| 102 | + | |
100 | 103 | | |
101 | | - | |
102 | 104 | | |
103 | 105 | | |
104 | 106 | | |
| |||
0 commit comments