|
|
|
|
@ -11151,7 +11151,7 @@ To avoid unpleasant surprises.
|
|
|
|
|
This declares an unnamed `lock` object that immediately goes out of scope at the point of the semicolon.
|
|
|
|
|
This is not an uncommon mistake.
|
|
|
|
|
In particular, this particular example can lead to hard-to find race conditions.
|
|
|
|
|
There are exceedingly clever used of this "idiom", but they are far rarer than the mistakes.
|
|
|
|
|
There are exceedingly clever uses of this "idiom", but they are far rarer than the mistakes.
|
|
|
|
|
|
|
|
|
|
##### Note
|
|
|
|
|
|
|
|
|
|
|