Returning from method inside a @synchronized block

后端 未结 1 736
难免孤独
难免孤独 2021-01-11 12:45

I\'d just like to know if it\'s advised to return from a method within a @synchronized block? For example:

- (id)test {
   @synchro         


        
相关标签:
1条回答
  • 2021-01-11 13:44

    It's fine. @synchronized is aware of the return statement.

    (Ref: http://www.thaesofereode.info/clocFAQ/#sync-advs) - dead link
    (Ref: http://nextstep.sdf-eu.org/clocFAQ/#sync-advs) - this link reference above dead one and may not be up to date as its header says

    0 讨论(0)
提交回复
热议问题