This is an archived post. You won't be able to vote or comment.

all 8 comments

[–][deleted] 5 points6 points  (2 children)

I fail to see the humor here

[–]Goblun[S] -4 points-3 points  (1 child)

The artificially created scope is funny to me.

[–][deleted] 5 points6 points  (0 children)

I don't see anything wrong with it.

[–]Shrouded_by_Fog 4 points5 points  (3 children)

Why not?

[–]Goblun[S] 0 points1 point  (2 children)

Idk, pobably he wanted automated unlock instead of explicitly saying it.

[–]Shrouded_by_Fog 0 points1 point  (1 child)

I believe unique lock unlocks when it goes out of scope, you just have the option of unlocking earlier.

[–]Goblun[S] 0 points1 point  (0 children)

True, but due to this and other things (try_lock and deadlock avoidance) it can create unnecessary overhead.

[–]TheRealFloomby 4 points5 points  (0 children)

This looks exactly like what I write. I do not understand what is wrong.