{"id":3113,"date":"2011-02-24T11:56:09","date_gmt":"2011-02-24T16:56:09","guid":{"rendered":"http:\/\/mjtsai.com\/blog\/?p=3113"},"modified":"2020-01-03T14:49:55","modified_gmt":"2020-01-03T19:49:55","slug":"blocks-gcd-design-patterns","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2011\/02\/24\/blocks-gcd-design-patterns\/","title":{"rendered":"Blocks + GCD Design Patterns"},"content":{"rendered":"<p><a href=\"http:\/\/cocoasamurai.blogspot.com\/2011\/02\/practical-design-patterns-with-blocks.html\">Colin Wheeler<\/a> (via <a href=\"http:\/\/inessential.com\/2011\/02\/23\/blocks_gcd_design_patterns\">Brent Simmons<\/a>):<\/p>\n<blockquote cite=\"http:\/\/cocoasamurai.blogspot.com\/2011\/02\/practical-design-patterns-with-blocks.html\"><p> Out of all the API calls I saw in grand central dispatch the one that initially impressed me least was <code>dispatch_once<\/code>. However after reading its documentation and using it a bunch I realized how useful this one API call is. Not only it is a dead simple way to ensure that code only gets executed once, but it is also thread safe.<\/p><\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Colin Wheeler (via Brent Simmons): Out of all the API calls I saw in grand central dispatch the one that initially impressed me least was dispatch_once. However after reading its documentation and using it a bunch I realized how useful this one API call is. Not only it is a dead simple way to ensure [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2020-01-03T19:49:58Z","apple_news_api_id":"dbe1e3d2-2078-4b40-9410-f7850e662c91","apple_news_api_modified_at":"2020-01-03T19:49:58Z","apple_news_api_revision":"AAAAAAAAAAD\/\/\/\/\/\/\/\/\/\/w==","apple_news_api_share_url":"https:\/\/apple.news\/A2-Hj0iB4S0CUEPeFDmYskQ","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[1914,880,30,71],"class_list":["post-3113","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-design-patterns","tag-grand-central-dispatch-gcd","tag-mac","tag-programming"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/3113","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=3113"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/3113\/revisions"}],"predecessor-version":[{"id":3114,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/3113\/revisions\/3114"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=3113"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=3113"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=3113"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}