{"id":93306,"date":"2016-04-15T07:00:00","date_gmt":"2016-04-15T21:00:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/?p=93306"},"modified":"2019-03-13T11:02:03","modified_gmt":"2019-03-13T18:02:03","slug":"20160415-00","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20160415-00\/?p=93306\/","title":{"rendered":"What happens if I call EnumPropsEx while another thread is mutating the properties?"},"content":{"rendered":"<p>Following up on the question <a HREF=\"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/20160303-00\/?p=93111\">Are SetProp and RemoveProp thread-safe?<\/a>, you might wonder what happens if you call <code>Enum&shy;Props&shy;Ex<\/code> while another thread is mutating the properties? <\/p>\n<p>The answer is similar to what you get if <a HREF=\"https:\/\/devblogs.microsoft.com\/oldnewthing\/\">you call <code>Find&shy;First&shy;File<\/code> \/ <code>Find&shy;Next&shy;File<\/code> while somebody else is creating or deleting files<\/a>. <\/p>\n<ul>\n<li>If a property is created after the enumeration starts,     then it is unspecified whether it will be reported by     <code>Enum&shy;Props&shy;Ex<\/code>. \n<li>If a property is deleted after the enumeration starts,     then it is unspecified whether it will be reported by     <code>Enum&shy;Props&shy;Ex<\/code>.     Special exception: The enumeration callback is allowed     to remove the property being enumerated. \n<li>If a property is modified after the enumeration starts,     then it is unspecified whether the value reported by     <code>Enum&shy;Props&shy;Ex<\/code>     is the old value or the new value. <\/ul>\n<p>Hopefully, nobody is playing games with properties that are so crazy that any of these rules will actually come into play, aside from the special exception. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>You get a best-effort.<\/p>\n","protected":false},"author":1069,"featured_media":111744,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[25],"class_list":["post-93306","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-code"],"acf":[],"blog_post_summary":"<p>You get a best-effort.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/93306","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/users\/1069"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/comments?post=93306"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/93306\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media\/111744"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media?parent=93306"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=93306"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=93306"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}