{"id":18450,"date":"2017-07-24T16:55:00","date_gmt":"2017-07-24T20:55:00","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=18450"},"modified":"2017-07-24T16:55:00","modified_gmt":"2017-07-24T20:55:00","slug":"nsnotificationcenter-thread-safety","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2017\/07\/24\/nsnotificationcenter-thread-safety\/","title":{"rendered":"NSNotificationCenter Thread Safety"},"content":{"rendered":"<p><a href=\"http:\/\/lapcatsoftware.com\/articles\/nsnotificationcenter-is-threadsafe.html\">Jeff Johnson<\/a>:<\/p>\n<blockquote cite=\"http:\/\/lapcatsoftware.com\/articles\/nsnotificationcenter-is-threadsafe.html\">\n<p>As far as I can tell, <code>NSNotificationCenter<\/code> now keeps a strong reference to the observer while posting a notification. As a consequence, the observer can no longer deallocate while processing the notification. This behavior occurs both with Automatic Reference Counting (ARC) and with Manual Retain-Release (MRR). Hooray!<\/p>\n<p>It&rsquo;s still true that <code>removeObserver:<\/code> does not block for notifications in progress.<\/p>\n<\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Jeff Johnson: As far as I can tell, NSNotificationCenter now keeps a strong reference to the observer while posting a notification. As a consequence, the observer can no longer deallocate while processing the notification. This behavior occurs both with Automatic Reference Counting (ARC) and with Manual Retain-Release (MRR). Hooray! It&rsquo;s still true that removeObserver: does [&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":"","apple_news_api_id":"","apple_news_api_modified_at":"","apple_news_api_revision":"","apple_news_api_share_url":"","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,2],"tags":[55,69,800,31,1380,30,1381,571,71],"class_list":["post-18450","post","type-post","status-publish","format-standard","hentry","category-programming-category","category-technology","tag-arc","tag-cocoa","tag-concurrency","tag-ios","tag-ios-10","tag-mac","tag-macos-10-12","tag-memory-management","tag-programming"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/18450","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=18450"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/18450\/revisions"}],"predecessor-version":[{"id":18451,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/18450\/revisions\/18451"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=18450"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=18450"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=18450"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}