objective c - Does dispatch_async() and similar provide memory fences? -


when run block on queue via dispatch_async or similar, gcd provide thread fences around block invocation? assume does, documentation gives no hint 1 way or other far can tell.

from email thread on cocoa-dev mailing list, greg parker (one of apple's runtime engineers) replied question of mine:

[s]ince use of gcd hasn't brought catastrophe down on of our heads, assume dispatch_async() , provide such memory barriers. likewise, nsoperationqueue, -performselector:onthread:..., , must also. right?

i expect multiprocessing primitive not provide sufficient memory barriers uses document fact loudly. dispatch_once()'s storage 1 documented example of missing barriers. of osatomic functions example. pretty heavier-weight ought provide complete memory barriers clients.


Comments

Popular posts from this blog

jquery - How do you format the date used in the popover widget title of FullCalendar? -

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -