<em>logical</em> race conditions (unexpected values, overwrites, etc.). This is a design consideration, not a stability issue. Minimize shared mutable state between threads unless intentional.</p>
<p><strong>Only <code>$thread()</code> objects provide explicit locking and unlocking via <code>lock()</code>, <code>unlock()</code>, and <code>trylock()</code>.</strong> To protect access to a shared resource, create a <code>$thread()</code> lock object and use it to guard access. Calling <code>.lock()</code> or 