Does return “happen after” finally?

后端 未结 4 1023
时光取名叫无心
时光取名叫无心 2020-12-05 17:29

I am trying to convince myself that actions taken in the finally clause happen before the function return (in the memory consistency sense). From the J

4条回答
  •  感情败类
    2020-12-05 18:18

    If you are using only one thread, you should see "take+, fetch+, fetch-, take-". In your example, it's multi-threaded, so you are not sure what happens first.

提交回复
热议问题