{"id":1858,"date":"2009-01-12T12:28:48","date_gmt":"2009-01-12T16:28:48","guid":{"rendered":"http:\/\/mjtsai.com\/blog\/?p=1858"},"modified":"2009-01-12T12:28:51","modified_gmt":"2009-01-12T16:28:51","slug":"mac-os-x-thread-safety","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2009\/01\/12\/mac-os-x-thread-safety\/","title":{"rendered":"Mac OS X Thread Safety"},"content":{"rendered":"<p><a href=\"http:\/\/www.mikeash.com\/?page=pyblog\/friday-qa-2009-01-09.html\">Mike Ash<\/a>:<\/p>\n<blockquote cite=\"http:\/\/www.mikeash.com\/?page=pyblog\/friday-qa-2009-01-09.html\"><p> This is all fine and dandy except that Apple, in their infinite wisdom, does not always distinguish between <b>main thread only<\/b> and <b>not thread safe<\/b>. To make things worse, they even sometimes use the term <b>thread safe<\/b> to mean what we have defined here as <b>not thread safe<\/b>.<\/p><\/blockquote>\n<p>The post has good examples of the different kinds of thread safety in Mac OS X and how Apple describes (or neglects to describe) them. However, contra Ash, I think the documentation really <em>is<\/em> trying to convey that Search Kit is thread-safe. The full text from the <a href=\"http:\/\/developer.apple.com\/documentation\/UserExperience\/Reference\/SearchKit\/Reference\/reference.html\">reference page<\/a> says:<\/p>\n<blockquote cite=\"http:\/\/developer.apple.com\/documentation\/UserExperience\/Reference\/SearchKit\/Reference\/reference.html\"><p>Search Kit is thread-safe. You can use separate indexing and searching threads. Your application is responsible for ensuring that no more than one process is open at a time for writing to an index.<\/p><\/blockquote>\n<p>This implies that you can have multiple threads reading and writing, and in my experience this does work. It also points to a fourth category of thread-safety: how the API handles multiple threads or multiple <em>processes<\/em> creating separate objects that reference the same shared file or other resource.<\/p>","protected":false},"excerpt":{"rendered":"<p>Mike Ash: This is all fine and dandy except that Apple, in their infinite wisdom, does not always distinguish between main thread only and not thread safe. To make things worse, they even sometimes use the term thread safe to mean what we have defined here as not thread safe. The post has good examples [&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],"tags":[],"class_list":["post-1858","post","type-post","status-publish","format-standard","hentry","category-programming-category"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/1858","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=1858"}],"version-history":[{"count":0,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/1858\/revisions"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=1858"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=1858"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=1858"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}