<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">It has been expressed in various ways "does anybody actually use scoped visibility in the wild" and "what real benefit does it provide to production code".</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">The below file or some estranged stepchild of it appears at least 5 repositories (that I know of; this is practically a samizdat around here). &nbsp;The scoped access modifier is a significant improvement to the safety of this code and by extension the many projects that contain it.</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">Apologies if this listing is rather tiring. &nbsp;Many of the "solutions" proposed by the anti-private camp sound great in a sentence but fall apart at scale. &nbsp;But it is not obvious why this is so to people who do not use the keyword, so I can understand why they keep suggesting poor solutions. &nbsp;Perhaps with a more involved listing, it will become more obvious why many of these suggestions do not work. &nbsp;The original is a lot longer; I did reduce it to only the parts that seem relevant to this thread.</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;"><span style="font-variant-ligatures: no-common-ligatures"></span><br></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">import</span><span style="font-variant-ligatures: no-common-ligatures"> Foundation</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;"><span style="font-variant-ligatures: no-common-ligatures"></span><br></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0);"><span style="font-variant-ligatures: no-common-ligatures">/**</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0);"><span style="font-variant-ligatures: no-common-ligatures">&nbsp;This code demonstrates one of the usecases for 'private'.&nbsp; Adapted from real production code, this file exports a threading primitive to the rest of the program.</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0); min-height: 13px;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp;</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0);"><span style="font-variant-ligatures: no-common-ligatures">&nbsp;To state it briefly, private is necessary here because we need the following visibility nesting to achieve our objective:</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0); min-height: 13px;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp;</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0);"><span style="font-variant-ligatures: no-common-ligatures">&nbsp;┌───────────────────────────────────────────┐</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0);"><span style="font-variant-ligatures: no-common-ligatures">&nbsp;│PROGRAM/internal &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; │</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0);"><span style="font-variant-ligatures: no-common-ligatures">&nbsp;│ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; │</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0);"><span style="font-variant-ligatures: no-common-ligatures">&nbsp;│ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; │</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0);"><span style="font-variant-ligatures: no-common-ligatures">&nbsp;│ &nbsp; &nbsp; ┌───────────────────────────────────┐ │</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0);"><span style="font-variant-ligatures: no-common-ligatures">&nbsp;│ &nbsp; &nbsp; │ ThreadsafeWrapperNotifyChanged&nbsp; &nbsp; │ │</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0);"><span style="font-variant-ligatures: no-common-ligatures">&nbsp;│ &nbsp; &nbsp; │ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; │ │</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0);"><span style="font-variant-ligatures: no-common-ligatures">&nbsp;│ &nbsp; &nbsp; │&nbsp; &nbsp; &nbsp; ┌──────────────────────┐ &nbsp; &nbsp; │ │</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0);"><span style="font-variant-ligatures: no-common-ligatures">&nbsp;│ &nbsp; &nbsp; │&nbsp; &nbsp; &nbsp; │ &nbsp; ThreadsafeWrapper&nbsp; │ &nbsp; &nbsp; │ │</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0);"><span style="font-variant-ligatures: no-common-ligatures">&nbsp;│ &nbsp; &nbsp; │&nbsp; &nbsp; &nbsp; │&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; │ &nbsp; &nbsp; │ │</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0);"><span style="font-variant-ligatures: no-common-ligatures">&nbsp;│ &nbsp; &nbsp; │&nbsp; &nbsp; &nbsp; │&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; │ &nbsp; &nbsp; │ │</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0);"><span style="font-variant-ligatures: no-common-ligatures">&nbsp;│ &nbsp; &nbsp; │&nbsp; &nbsp; &nbsp; │&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; value &nbsp; &nbsp; &nbsp; │ &nbsp; &nbsp; │ │</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0);"><span style="font-variant-ligatures: no-common-ligatures">&nbsp;│ &nbsp; &nbsp; │&nbsp; &nbsp; &nbsp; │&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; │ &nbsp; &nbsp; │ │</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0);"><span style="font-variant-ligatures: no-common-ligatures">&nbsp;│ &nbsp; &nbsp; │&nbsp; &nbsp; &nbsp; │&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; │ &nbsp; &nbsp; │ │</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0);"><span style="font-variant-ligatures: no-common-ligatures">&nbsp;│ &nbsp; &nbsp; │&nbsp; &nbsp; &nbsp; └──────────────────────┘ &nbsp; &nbsp; │ │</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0);"><span style="font-variant-ligatures: no-common-ligatures">&nbsp;│ &nbsp; &nbsp; │ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; │ │</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0);"><span style="font-variant-ligatures: no-common-ligatures">&nbsp;│ &nbsp; &nbsp; └───────────────────────────────────┘ │</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0);"><span style="font-variant-ligatures: no-common-ligatures">&nbsp;└───────────────────────────────────────────┘</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0); min-height: 13px;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp;</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0);"><span style="font-variant-ligatures: no-common-ligatures">&nbsp;In particular:</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0); min-height: 13px;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp;</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0);"><span style="font-variant-ligatures: no-common-ligatures">&nbsp;1.&nbsp; value a.k.a. "t" must be protected against all potential unsafe access.&nbsp; This file is hundreds of lines, auditing the whole thing is very tedious.</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0);"><span style="font-variant-ligatures: no-common-ligatures">&nbsp;2.&nbsp; ThreadsafeWrapper is an implementation detail of ThreadsafeWrapperNotifyChanged which is not intended for use by other callers.&nbsp; To avoid exposing the class to other callers, it must appear in this file.</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0);"><span style="font-variant-ligatures: no-common-ligatures">&nbsp;3.&nbsp; This file cannot be made an entire module, because it's actually used as part of several projects that are shipped as frameworks, and apparently some developers get really annoyed when they have to drag too many frameworks into their Xcode project.</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0);"><span style="font-variant-ligatures: no-common-ligatures">&nbsp;4.&nbsp; The use of `private` here reduces the "maybe not threadsafe" part of the code from 196 lines to 47 lines (a reduction of buggy code of 76%).&nbsp; In the production file from which this example is derived, the reduction is from 423 lines to 33 lines, or 92%.&nbsp; A scoped access variable significantly improves the threadsafety of this code.</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0); min-height: 13px;"><span style="font-variant-ligatures: no-common-ligatures"></span><br></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0);"><span style="font-variant-ligatures: no-common-ligatures">&nbsp;*/</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;"><span style="font-variant-ligatures: no-common-ligatures"></span><br></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 143, 0);"><span style="font-variant-ligatures: no-common-ligatures">//Define an interface common to both major components</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(4, 51, 255);"><span style="font-variant-ligatures: no-common-ligatures">private</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000"> </span><span style="font-variant-ligatures: no-common-ligatures">protocol</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000"> Threadsafe : </span><span style="font-variant-ligatures: no-common-ligatures">class</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000"> {</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0);"><span style="font-variant-ligatures: no-common-ligatures; color: #000000">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures">///the type of the value we are protecting</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(4, 51, 255);"><span style="font-variant-ligatures: no-common-ligatures; color: #000000">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures">associatedtype</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000"> T</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0);"><span style="font-variant-ligatures: no-common-ligatures; color: #000000">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures">///Access the underlying value.</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0);"><span style="font-variant-ligatures: no-common-ligatures; color: #000000">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures">///- </span><span style="font-variant-ligatures: no-common-ligatures; color: #008f00">parameter</span><span style="font-variant-ligatures: no-common-ligatures"> block: The block that will be passed the protected value.&nbsp; The block acts as an exclusive lock; while you're in it, no other consumers will be accessing the value. &nbsp;</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0);"><span style="font-variant-ligatures: no-common-ligatures; color: #000000">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures">///- </span><span style="font-variant-ligatures: no-common-ligatures; color: #008f00">complexity</span><span style="font-variant-ligatures: no-common-ligatures">: Coalescing multiple operations into a single block improves performance.</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">func</span><span style="font-variant-ligatures: no-common-ligatures"> accessT&lt;K&gt;(</span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">_</span><span style="font-variant-ligatures: no-common-ligatures"> block: </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">@escaping</span><span style="font-variant-ligatures: no-common-ligatures"> (T) </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">throws</span><span style="font-variant-ligatures: no-common-ligatures"> -&gt; </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">K</span><span style="font-variant-ligatures: no-common-ligatures">) </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">throws</span><span style="font-variant-ligatures: no-common-ligatures"> -&gt; </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">K</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0);"><span style="font-variant-ligatures: no-common-ligatures; color: #000000">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures">///Mutate the underlying value.</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0);"><span style="font-variant-ligatures: no-common-ligatures; color: #000000">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures">///- </span><span style="font-variant-ligatures: no-common-ligatures; color: #008f00">parameter</span><span style="font-variant-ligatures: no-common-ligatures"> block: The block that will be passed the protected value.&nbsp; The block acts as an exclusive lock; while you're in it, no other consumers will be accessing the value.</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0);"><span style="font-variant-ligatures: no-common-ligatures; color: #000000">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures">///- </span><span style="font-variant-ligatures: no-common-ligatures; color: #008f00">complexity</span><span style="font-variant-ligatures: no-common-ligatures">: Coalescing multiple operations into a single block improves performance.</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">func</span><span style="font-variant-ligatures: no-common-ligatures"> mutateT&lt;K&gt;(</span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">_</span><span style="font-variant-ligatures: no-common-ligatures"> block: </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">@escaping</span><span style="font-variant-ligatures: no-common-ligatures"> (inout T) </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">throws</span><span style="font-variant-ligatures: no-common-ligatures"> -&gt; </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">K</span><span style="font-variant-ligatures: no-common-ligatures">) </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">throws</span><span style="font-variant-ligatures: no-common-ligatures"> -&gt; </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">K</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">}</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;"><span style="font-variant-ligatures: no-common-ligatures"></span><br></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0);"><span style="font-variant-ligatures: no-common-ligatures">///Some convenience accessors for callers that do not need a block-based API to get lock semantics / operation coalescing</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(52, 149, 175);"><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">extension</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000"> </span><span style="font-variant-ligatures: no-common-ligatures">Threadsafe</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000"> {</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">var</span><span style="font-variant-ligatures: no-common-ligatures"> value : T {</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">get</span><span style="font-variant-ligatures: no-common-ligatures"> {</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">var</span><span style="font-variant-ligatures: no-common-ligatures"> t: T! = </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">nil</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">try</span><span style="font-variant-ligatures: no-common-ligatures">! </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">accessT</span><span style="font-variant-ligatures: no-common-ligatures">({ lt </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">in</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; t = lt</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; })</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">return</span><span style="font-variant-ligatures: no-common-ligatures"> t</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; }</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">set</span><span style="font-variant-ligatures: no-common-ligatures"> {</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">try</span><span style="font-variant-ligatures: no-common-ligatures">! </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">mutateT</span><span style="font-variant-ligatures: no-common-ligatures">({ (lt:</span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">inout</span><span style="font-variant-ligatures: no-common-ligatures"> T) -&gt; () </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">in</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lt = newValue</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; })</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; }</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; }</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">}</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;"><span style="font-variant-ligatures: no-common-ligatures"></span><br></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0);"><span style="font-variant-ligatures: no-common-ligatures">///The core synchronization primitive.&nbsp; This is a private implementation detail of ThreadsafeWrapperNotifyChanged.</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 143, 0);"><span style="font-variant-ligatures: no-common-ligatures">//MARK: audit this area begin</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">private</span><span style="font-variant-ligatures: no-common-ligatures"> </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">final</span><span style="font-variant-ligatures: no-common-ligatures"> </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">class</span><span style="font-variant-ligatures: no-common-ligatures"> ThreadsafeWrapper&lt;T&gt; : </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">Threadsafe</span><span style="font-variant-ligatures: no-common-ligatures"> {</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0);"><span style="font-variant-ligatures: no-common-ligatures; color: #000000">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures">/**The value we are protecting.&nbsp; This value needs to be protected against unsafe access from</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0);"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; 1.&nbsp; This type, if a scoped keyword is available (as shown)</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0);"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; 2.&nbsp; The entire file, if a scoped keyword is removed.</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0);"><span style="font-variant-ligatures: no-common-ligatures">&nbsp;&nbsp; &nbsp; Only access this value on the synchronizationQueue.</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0);"><span style="font-variant-ligatures: no-common-ligatures">&nbsp;&nbsp; &nbsp; */</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(4, 51, 255);"><span style="font-variant-ligatures: no-common-ligatures; color: #000000">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures">private</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000"> </span><span style="font-variant-ligatures: no-common-ligatures">var</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000"> t: </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">T</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0);"><span style="font-variant-ligatures: no-common-ligatures; color: #000000">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures">///The queue that is used to synchronize the value, only access the value from the queue.</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0);"><span style="font-variant-ligatures: no-common-ligatures; color: #000000">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures">///- </span><span style="font-variant-ligatures: no-common-ligatures; color: #008f00">note</span><span style="font-variant-ligatures: no-common-ligatures">: fileprivate is used here to allow the wrapped object to access the queue.&nbsp; Demonstrating that both are legitimately useful modifiers.</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">fileprivate</span><span style="font-variant-ligatures: no-common-ligatures"> </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">let</span><span style="font-variant-ligatures: no-common-ligatures"> synchronizationQueue: </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">DispatchQueue</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp;&nbsp; &nbsp;</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">internal</span><span style="font-variant-ligatures: no-common-ligatures"> </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">init</span><span style="font-variant-ligatures: no-common-ligatures"> (t: </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">T</span><span style="font-variant-ligatures: no-common-ligatures">, queueDescription: </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">String</span><span style="font-variant-ligatures: no-common-ligatures">) {</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(52, 149, 175);"><span style="font-variant-ligatures: no-common-ligatures; color: #000000">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">self</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000">.</span><span style="font-variant-ligatures: no-common-ligatures">synchronizationQueue</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000"> = </span><span style="font-variant-ligatures: no-common-ligatures">DispatchQueue</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000">(label: </span><span style="font-variant-ligatures: no-common-ligatures; color: #b4261a">"foo"</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000">)</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">self</span><span style="font-variant-ligatures: no-common-ligatures">.</span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">t</span><span style="font-variant-ligatures: no-common-ligatures"> = t</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; }</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp;&nbsp; &nbsp;</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 143, 0);"><span style="font-variant-ligatures: no-common-ligatures; color: #000000">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures">//MARK: implement our Threadsafe protocol</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">func</span><span style="font-variant-ligatures: no-common-ligatures"> accessT&lt;K&gt;(</span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">_</span><span style="font-variant-ligatures: no-common-ligatures"> block: </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">@escaping</span><span style="font-variant-ligatures: no-common-ligatures"> (</span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">T</span><span style="font-variant-ligatures: no-common-ligatures">) </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">throws</span><span style="font-variant-ligatures: no-common-ligatures"> -&gt; </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">K</span><span style="font-variant-ligatures: no-common-ligatures">) </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">throws</span><span style="font-variant-ligatures: no-common-ligatures"> -&gt; </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">K</span><span style="font-variant-ligatures: no-common-ligatures"> {</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">var</span><span style="font-variant-ligatures: no-common-ligatures"> k : </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">K</span><span style="font-variant-ligatures: no-common-ligatures">!</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">var</span><span style="font-variant-ligatures: no-common-ligatures"> err: </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">Error</span><span style="font-variant-ligatures: no-common-ligatures">?</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">synchronizationQueue</span><span style="font-variant-ligatures: no-common-ligatures">.</span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">sync</span><span style="font-variant-ligatures: no-common-ligatures">() {[unowned </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">self</span><span style="font-variant-ligatures: no-common-ligatures">] () -&gt; </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">Void</span><span style="font-variant-ligatures: no-common-ligatures"> </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">in</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">do</span><span style="font-variant-ligatures: no-common-ligatures"> { </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">try</span><span style="font-variant-ligatures: no-common-ligatures"> k = block(</span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">self</span><span style="font-variant-ligatures: no-common-ligatures">.</span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">t</span><span style="font-variant-ligatures: no-common-ligatures">) }</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">catch</span><span style="font-variant-ligatures: no-common-ligatures"> { err = error }</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; }</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">if</span><span style="font-variant-ligatures: no-common-ligatures"> </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">let</span><span style="font-variant-ligatures: no-common-ligatures"> err = err { </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">throw</span><span style="font-variant-ligatures: no-common-ligatures"> err }</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">return</span><span style="font-variant-ligatures: no-common-ligatures"> k</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; }</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp;&nbsp; &nbsp;</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">func</span><span style="font-variant-ligatures: no-common-ligatures"> mutateT&lt;K&gt;(</span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">_</span><span style="font-variant-ligatures: no-common-ligatures"> block: </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">@escaping</span><span style="font-variant-ligatures: no-common-ligatures"> (inout </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">T</span><span style="font-variant-ligatures: no-common-ligatures">) </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">throws</span><span style="font-variant-ligatures: no-common-ligatures"> -&gt; </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">K</span><span style="font-variant-ligatures: no-common-ligatures">) </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">throws</span><span style="font-variant-ligatures: no-common-ligatures"> -&gt; </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">K</span><span style="font-variant-ligatures: no-common-ligatures"> {</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">var</span><span style="font-variant-ligatures: no-common-ligatures"> k : </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">K</span><span style="font-variant-ligatures: no-common-ligatures">!</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">var</span><span style="font-variant-ligatures: no-common-ligatures"> err: </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">Error</span><span style="font-variant-ligatures: no-common-ligatures">?</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">synchronizationQueue</span><span style="font-variant-ligatures: no-common-ligatures">.</span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">sync</span><span style="font-variant-ligatures: no-common-ligatures">() {[unowned </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">self</span><span style="font-variant-ligatures: no-common-ligatures">] () -&gt; </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">Void</span><span style="font-variant-ligatures: no-common-ligatures"> </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">in</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">do</span><span style="font-variant-ligatures: no-common-ligatures"> { k = </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">try</span><span style="font-variant-ligatures: no-common-ligatures"> </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">self</span><span style="font-variant-ligatures: no-common-ligatures">.</span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">fastMutateT</span><span style="font-variant-ligatures: no-common-ligatures">(block) }</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">catch</span><span style="font-variant-ligatures: no-common-ligatures"> { err = error }</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; }</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">if</span><span style="font-variant-ligatures: no-common-ligatures"> </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">let</span><span style="font-variant-ligatures: no-common-ligatures"> err = err { </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">throw</span><span style="font-variant-ligatures: no-common-ligatures"> err }</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">return</span><span style="font-variant-ligatures: no-common-ligatures"> k</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; }</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp;&nbsp; &nbsp;</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0);"><span style="font-variant-ligatures: no-common-ligatures; color: #000000">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures">///An alternate mutation function that can only be used when inside a block already.</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0);"><span style="font-variant-ligatures: no-common-ligatures; color: #000000">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures">///- </span><span style="font-variant-ligatures: no-common-ligatures; color: #008f00">note</span><span style="font-variant-ligatures: no-common-ligatures">: Calling this function from the wrong queue is NOT thread-unsafe, it will merely crash the program.&nbsp; So exposing this API to the file may introduce bugs, but none of them are a threadsafety concern.</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">func</span><span style="font-variant-ligatures: no-common-ligatures"> fastMutateT&lt;K&gt;(</span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">_</span><span style="font-variant-ligatures: no-common-ligatures"> block: </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">@escaping</span><span style="font-variant-ligatures: no-common-ligatures"> (inout </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">T</span><span style="font-variant-ligatures: no-common-ligatures">) </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">throws</span><span style="font-variant-ligatures: no-common-ligatures"> -&gt; </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">K</span><span style="font-variant-ligatures: no-common-ligatures">) </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">throws</span><span style="font-variant-ligatures: no-common-ligatures"> -&gt; </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">K</span><span style="font-variant-ligatures: no-common-ligatures"> {</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(52, 149, 175);"><span style="font-variant-ligatures: no-common-ligatures; color: #000000">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures">dispatchPrecondition</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000">(condition: .</span><span style="font-variant-ligatures: no-common-ligatures">onQueue</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000">(</span><span style="font-variant-ligatures: no-common-ligatures">synchronizationQueue</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000">))</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">return</span><span style="font-variant-ligatures: no-common-ligatures"> </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">try</span><span style="font-variant-ligatures: no-common-ligatures"> block(&amp;</span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">t</span><span style="font-variant-ligatures: no-common-ligatures">)</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; }</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">}</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 143, 0);"><span style="font-variant-ligatures: no-common-ligatures">//MARK: audit area end</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;"><span style="font-variant-ligatures: no-common-ligatures"></span><br></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0);"><span style="font-variant-ligatures: no-common-ligatures">/**Like ThreadsafeWrapper, but also allows us to find out when the wrapped object changes.</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0);"><span style="font-variant-ligatures: no-common-ligatures">&nbsp;For that reason, it has a little more overhead than ThreadsafeWrapper, and requires the wrapped type to be equatable */</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">final</span><span style="font-variant-ligatures: no-common-ligatures"> </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">class</span><span style="font-variant-ligatures: no-common-ligatures"> ThreadsafeWrapperNotifyChanged&lt;T: Equatable&gt; : </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">Threadsafe</span><span style="font-variant-ligatures: no-common-ligatures"> {</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp;&nbsp; &nbsp;</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0);"><span style="font-variant-ligatures: no-common-ligatures; color: #000000">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures">///Hold the value and a list of semaphores</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(52, 149, 175);"><span style="font-variant-ligatures: no-common-ligatures; color: #000000">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">private</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000"> </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">let</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000"> tsw: </span><span style="font-variant-ligatures: no-common-ligatures">ThreadsafeWrapper</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000">&lt;(</span><span style="font-variant-ligatures: no-common-ligatures">T</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000">, [</span><span style="font-variant-ligatures: no-common-ligatures">DispatchSemaphore</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000">])&gt;</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp;&nbsp; &nbsp;</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">internal</span><span style="font-variant-ligatures: no-common-ligatures"> </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">init</span><span style="font-variant-ligatures: no-common-ligatures"> (t: </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">T</span><span style="font-variant-ligatures: no-common-ligatures">, queueDescription: </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">String</span><span style="font-variant-ligatures: no-common-ligatures">) {</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">self</span><span style="font-variant-ligatures: no-common-ligatures">.</span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">tsw</span><span style="font-variant-ligatures: no-common-ligatures"> = </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">ThreadsafeWrapper</span><span style="font-variant-ligatures: no-common-ligatures">(t: (t, []), queueDescription: </span><span style="font-variant-ligatures: no-common-ligatures; color: #b4261a">"foo"</span><span style="font-variant-ligatures: no-common-ligatures">)</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; }</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp;&nbsp; &nbsp;</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 143, 0);"><span style="font-variant-ligatures: no-common-ligatures; color: #000000">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures">//MARK: implement our Threadsafe protocol</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">func</span><span style="font-variant-ligatures: no-common-ligatures"> mutateT&lt;K&gt;(</span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">_</span><span style="font-variant-ligatures: no-common-ligatures"> block: </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">@escaping</span><span style="font-variant-ligatures: no-common-ligatures"> (inout </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">T</span><span style="font-variant-ligatures: no-common-ligatures">) </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">throws</span><span style="font-variant-ligatures: no-common-ligatures"> -&gt; </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">K</span><span style="font-variant-ligatures: no-common-ligatures">) </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">throws</span><span style="font-variant-ligatures: no-common-ligatures"> -&gt; </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">K</span><span style="font-variant-ligatures: no-common-ligatures"> {</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">var</span><span style="font-variant-ligatures: no-common-ligatures"> k : </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">K</span><span style="font-variant-ligatures: no-common-ligatures">!</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">try</span><span style="font-variant-ligatures: no-common-ligatures"> </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">tsw</span><span style="font-variant-ligatures: no-common-ligatures">.</span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">mutateT</span><span style="font-variant-ligatures: no-common-ligatures"> { v </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">in</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">defer</span><span style="font-variant-ligatures: no-common-ligatures"> {</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">for</span><span style="font-variant-ligatures: no-common-ligatures"> sema </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">in</span><span style="font-variant-ligatures: no-common-ligatures"> v.1 {</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sema.</span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">signal</span><span style="font-variant-ligatures: no-common-ligatures">()</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">try</span><span style="font-variant-ligatures: no-common-ligatures"> </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">self</span><span style="font-variant-ligatures: no-common-ligatures">.</span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">tsw</span><span style="font-variant-ligatures: no-common-ligatures">.</span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">fastMutateT</span><span style="font-variant-ligatures: no-common-ligatures">({ v </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">in</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">try</span><span style="font-variant-ligatures: no-common-ligatures"> block(&amp;v.0)</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; })</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; }</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">return</span><span style="font-variant-ligatures: no-common-ligatures"> k</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; }</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">func</span><span style="font-variant-ligatures: no-common-ligatures"> accessT&lt;K&gt;(</span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">_</span><span style="font-variant-ligatures: no-common-ligatures"> block: </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">@escaping</span><span style="font-variant-ligatures: no-common-ligatures"> (</span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">T</span><span style="font-variant-ligatures: no-common-ligatures">) </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">throws</span><span style="font-variant-ligatures: no-common-ligatures"> -&gt; </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">K</span><span style="font-variant-ligatures: no-common-ligatures">) </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">throws</span><span style="font-variant-ligatures: no-common-ligatures"> -&gt; </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">K</span><span style="font-variant-ligatures: no-common-ligatures"> {</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">return</span><span style="font-variant-ligatures: no-common-ligatures"> </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">try</span><span style="font-variant-ligatures: no-common-ligatures"> </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">tsw</span><span style="font-variant-ligatures: no-common-ligatures">.</span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">accessT</span><span style="font-variant-ligatures: no-common-ligatures">({ v -&gt; </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">K</span><span style="font-variant-ligatures: no-common-ligatures"> </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">in</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">return</span><span style="font-variant-ligatures: no-common-ligatures"> </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">try</span><span style="font-variant-ligatures: no-common-ligatures"> block(v.0)</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; })</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; }</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp;&nbsp; &nbsp;</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp;&nbsp; &nbsp;</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0);"><span style="font-variant-ligatures: no-common-ligatures; color: #000000">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures">/**Notify when the value passed in has changed or the timeout has expired.</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0);"><span style="font-variant-ligatures: no-common-ligatures">&nbsp;&nbsp; &nbsp; By passing a particular value, we can avoid many race conditions.*/</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">func</span><span style="font-variant-ligatures: no-common-ligatures"> waitForChange(oldValue: </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">T</span><span style="font-variant-ligatures: no-common-ligatures">, timeOut: </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">TimeInterval</span><span style="font-variant-ligatures: no-common-ligatures">) </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">throws</span><span style="font-variant-ligatures: no-common-ligatures"> {</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">var</span><span style="font-variant-ligatures: no-common-ligatures"> sema : </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">DispatchSemaphore</span><span style="font-variant-ligatures: no-common-ligatures">! = </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">nil</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">if</span><span style="font-variant-ligatures: no-common-ligatures"> oldValue != </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">tsw</span><span style="font-variant-ligatures: no-common-ligatures">.</span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">value</span><span style="font-variant-ligatures: no-common-ligatures">.0 { </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">return</span><span style="font-variant-ligatures: no-common-ligatures"> } </span><span style="font-variant-ligatures: no-common-ligatures; color: #008f00">//fastpath</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 143, 0);"><span style="font-variant-ligatures: no-common-ligatures; color: #000000">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures">//slowpath</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">try</span><span style="font-variant-ligatures: no-common-ligatures"> </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">accessT</span><span style="font-variant-ligatures: no-common-ligatures"> {[unowned </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">self</span><span style="font-variant-ligatures: no-common-ligatures">] (tee) -&gt; () </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">in</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">if</span><span style="font-variant-ligatures: no-common-ligatures"> oldValue != tee { </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">return</span><span style="font-variant-ligatures: no-common-ligatures"> }</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sema = </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">DispatchSemaphore</span><span style="font-variant-ligatures: no-common-ligatures">(value: 0)</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">try</span><span style="font-variant-ligatures: no-common-ligatures"> </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">self</span><span style="font-variant-ligatures: no-common-ligatures">.</span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">tsw</span><span style="font-variant-ligatures: no-common-ligatures">.</span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">fastMutateT</span><span style="font-variant-ligatures: no-common-ligatures">({ v </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">in</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; v.1.</span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">append</span><span style="font-variant-ligatures: no-common-ligatures">(sema)</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; })</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; }</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">if</span><span style="font-variant-ligatures: no-common-ligatures"> sema == </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">nil</span><span style="font-variant-ligatures: no-common-ligatures"> { </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">return</span><span style="font-variant-ligatures: no-common-ligatures"> }</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 143, 0);"><span style="font-variant-ligatures: no-common-ligatures; color: #000000">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures">//clean up semaphore again</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">defer</span><span style="font-variant-ligatures: no-common-ligatures"> {</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">try</span><span style="font-variant-ligatures: no-common-ligatures">! </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">tsw</span><span style="font-variant-ligatures: no-common-ligatures">.</span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">mutateT</span><span style="font-variant-ligatures: no-common-ligatures"> { v </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">in</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(52, 149, 175);"><span style="font-variant-ligatures: no-common-ligatures; color: #000000">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; v.1.</span><span style="font-variant-ligatures: no-common-ligatures">removeItemMatchingReference</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000">(sema)</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; }</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">let</span><span style="font-variant-ligatures: no-common-ligatures"> time = </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">DispatchTime</span><span style="font-variant-ligatures: no-common-ligatures">.</span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">now</span><span style="font-variant-ligatures: no-common-ligatures">() + timeOut</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">if</span><span style="font-variant-ligatures: no-common-ligatures"> sema.</span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">wait</span><span style="font-variant-ligatures: no-common-ligatures">(timeout: time) </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">==</span><span style="font-variant-ligatures: no-common-ligatures"> .</span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">timedOut</span><span style="font-variant-ligatures: no-common-ligatures"> { </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">throw</span><span style="font-variant-ligatures: no-common-ligatures"> </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">Errors</span><span style="font-variant-ligatures: no-common-ligatures">.</span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">DeadlineExceeded</span><span style="font-variant-ligatures: no-common-ligatures"> }</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 143, 0);"><span style="font-variant-ligatures: no-common-ligatures; color: #000000">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures">//now, did we change?</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">let</span><span style="font-variant-ligatures: no-common-ligatures"> changed = </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">try</span><span style="font-variant-ligatures: no-common-ligatures"> </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">accessT</span><span style="font-variant-ligatures: no-common-ligatures"> { (val) -&gt; </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">Bool</span><span style="font-variant-ligatures: no-common-ligatures"> </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">in</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">return</span><span style="font-variant-ligatures: no-common-ligatures"> val != oldValue</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; }</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">if</span><span style="font-variant-ligatures: no-common-ligatures"> changed { </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">return</span><span style="font-variant-ligatures: no-common-ligatures"> }</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">try</span><span style="font-variant-ligatures: no-common-ligatures"> </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">waitForChange</span><span style="font-variant-ligatures: no-common-ligatures">(oldValue: oldValue, timeOut: timeOut) </span><span style="font-variant-ligatures: no-common-ligatures; color: #008f00">//</span><span style="line-height: normal; font-family: 'Apple Color Emoji'; font-variant-ligatures: no-common-ligatures; color: rgb(0, 143, 0);">🐞</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; }</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">}</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;"><span style="font-variant-ligatures: no-common-ligatures"></span><br></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 143, 0);"><span style="font-variant-ligatures: no-common-ligatures">//MARK: utility</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">enum</span><span style="font-variant-ligatures: no-common-ligatures"> Errors: </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">Error</span><span style="font-variant-ligatures: no-common-ligatures"> {</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">case</span><span style="font-variant-ligatures: no-common-ligatures"> DeadlineExceeded</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">}</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;"><span style="font-variant-ligatures: no-common-ligatures"></span><br></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">extension</span><span style="font-variant-ligatures: no-common-ligatures"> </span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">RangeReplaceableCollection</span><span style="font-variant-ligatures: no-common-ligatures"> </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">where</span><span style="font-variant-ligatures: no-common-ligatures"> Iterator.Element : AnyObject {</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 128, 0);"><span style="font-variant-ligatures: no-common-ligatures; color: #000000">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures">/// Remove first colleciton element that matches the given reference</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">mutating</span><span style="font-variant-ligatures: no-common-ligatures"> </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">func</span><span style="font-variant-ligatures: no-common-ligatures"> removeItemMatchingReference(</span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">_</span><span style="font-variant-ligatures: no-common-ligatures"> object : Iterator.Element) {</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">if</span><span style="font-variant-ligatures: no-common-ligatures"> </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">let</span><span style="font-variant-ligatures: no-common-ligatures"> index = </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">self</span><span style="font-variant-ligatures: no-common-ligatures">.</span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">index</span><span style="font-variant-ligatures: no-common-ligatures">(where: {$0 === object}) {</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff">self</span><span style="font-variant-ligatures: no-common-ligatures">.</span><span style="font-variant-ligatures: no-common-ligatures; color: #3495af">remove</span><span style="font-variant-ligatures: no-common-ligatures">(at: index)</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; &nbsp; &nbsp; }</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; }</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;">


































































































































































































</p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">}</span></p></div> <br><p class="airmail_on">On March 20, 2017 at 6:54:55 PM, Douglas Gregor (<a href="mailto:dgregor@apple.com">dgregor@apple.com</a>) wrote:</p> <blockquote type="cite" class="clean_bq"><span><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div></div><div>



<title></title>


<p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);" class="">Hello Swift community,</p>
<p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);" class="">The review of SE-0159 "Fix Private Access Levels" begins
now and runs through March 27, 2017. The proposal is available
here:</p>
<blockquote style="box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 1em; border-left-width: 0.25em; border-left-style: solid; border-left-color: rgb(223, 226, 229); background-color: rgb(255, 255, 255);" class="">
<div style="box-sizing: border-box; margin-top: 0px; margin-bottom: 0px;" class=""><a href="https://github.com/apple/swift-evolution/blob/master/proposals/0159-fix-private-access-levels.md" class=""><font color="#6A737D" face="-apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol" size="3" class="">https://github.com/apple/swift-evolution/blob/master/proposals/0159-fix-private-access-levels.md</font></a></div>
</blockquote>
<p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);" class="">Reviews are an important part of the Swift evolution
process. All reviews should be sent to the swift-evolution mailing
list at</p>
<blockquote style="box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 1em; color: rgb(106, 115, 125); border-left-width: 0.25em; border-left-style: solid; border-left-color: rgb(223, 226, 229); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);" class="">
<div style="box-sizing: border-box; margin-top: 0px; margin-bottom: 0px;" class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" style="box-sizing: border-box; background-color: transparent; -webkit-text-decoration-skip: objects; color: rgb(3, 102, 214); text-decoration: none;" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a></div>
</blockquote>
<p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);" class="">or, if you would like to keep your feedback private,
directly to the review manager. When replying, please try to keep
the proposal link at the top of the message:</p>
<blockquote style="box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 1em; border-left-width: 0.25em; border-left-style: solid; border-left-color: rgb(223, 226, 229); background-color: rgb(255, 255, 255);" class="">
<p style="color: rgb(106, 115, 125); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;" class="">Proposal link:</p>
<blockquote style="box-sizing: border-box; margin: 0px; padding: 0px 1em; border-left-width: 0.25em; border-left-style: solid; border-left-color: rgb(223, 226, 229);" class="">
<div style="box-sizing: border-box; margin-top: 0px; margin-bottom: 0px;" class=""><a href="https://github.com/apple/swift-evolution/blob/master/proposals/0159-fix-private-access-levels.md" class=""><font color="#6A737D" face="-apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol" size="3" class="">https://github.com/apple/swift-evolution/blob/master/proposals/0159-fix-private-access-levels.md</font></a></div>
</blockquote>
</blockquote>
<blockquote style="box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 1em; color: rgb(106, 115, 125); border-left-width: 0.25em; border-left-style: solid; border-left-color: rgb(223, 226, 229); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);" class="">
<div style="box-sizing: border-box; margin-top: 0px; margin-bottom: 0px;" class="">Reply text</div>
</blockquote>
<blockquote style="box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 1em; color: rgb(106, 115, 125); border-left-width: 0.25em; border-left-style: solid; border-left-color: rgb(223, 226, 229); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);" class="">
<blockquote style="box-sizing: border-box; margin: 0px; padding: 0px 1em; border-left-width: 0.25em; border-left-style: solid; border-left-color: rgb(223, 226, 229);" class="">
<div style="box-sizing: border-box; margin-top: 0px; margin-bottom: 0px;" class="">Other replies</div>
</blockquote>
</blockquote>
<h5 style="box-sizing: border-box; margin-top: 24px; margin-bottom: 16px; font-size: 0.875em; line-height: 1.25; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; background-color: rgb(255, 255, 255);" class=""><a id="user-content-what-goes-into-a-review-1" class="anchor" href="https://github.com/apple/swift-evolution/blob/master/process.md#what-goes-into-a-review-1" aria-hidden="true" style="box-sizing: border-box; background-color: transparent; -webkit-text-decoration-skip: objects; color: rgb(3, 102, 214); text-decoration: none; float: left; padding-right: 4px; margin-left: -20px; line-height: 1;">
<svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z">
</path>
</svg></a>What goes into a review?</h5>
<p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);" class="">The goal of the review process is to improve the proposal
under review through constructive criticism and, eventually,
determine the direction of Swift. When writing your review, here
are some questions you might want to answer in your review:</p>
<ul style="box-sizing: border-box; padding-left: 2em; margin-top: 0px; margin-bottom: 16px; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);" class="">
<li style="box-sizing: border-box;" class="">What is your
evaluation of the proposal?</li>
<li style="box-sizing: border-box; margin-top: 0.25em;" class="">Is
the problem being addressed significant enough to warrant a change
to Swift?</li>
<li style="box-sizing: border-box; margin-top: 0.25em;" class="">
Does this proposal fit well with the feel and direction of
Swift?</li>
<li style="box-sizing: border-box; margin-top: 0.25em;" class="">If
you have used other languages or libraries with a similar feature,
how do you feel that this proposal compares to those?</li>
<li style="box-sizing: border-box; margin-top: 0.25em;" class="">
How much effort did you put into your review? A glance, a quick
reading, or an in-depth study?</li>
</ul>
<p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);" class="">More information about the Swift evolution process is
available at</p>
<blockquote style="box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 1em; color: rgb(106, 115, 125); border-left-width: 0.25em; border-left-style: solid; border-left-color: rgb(223, 226, 229); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);" class="">
<div style="box-sizing: border-box; margin-top: 0px; margin-bottom: 0px;" class=""><a href="https://github.com/apple/swift-evolution/blob/master/process.md" style="box-sizing: border-box; background-color: transparent; -webkit-text-decoration-skip: objects; color: rgb(3, 102, 214); text-decoration: none;" class="">https://github.com/apple/swift-evolution/blob/master/process.md</a></div>
</blockquote>
<p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);" class="">Thank you,</p>
<p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);" class="">-Doug</p>
<p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);" class="">Review Manager</p>


_______________________________________________<br>swift-evolution-announce mailing list<br>swift-evolution-announce@swift.org<br>https://lists.swift.org/mailman/listinfo/swift-evolution-announce<br></div></div></span></blockquote></body></html>