Happens-before (source code)

= Happens-before
{title2=$\to_{\mathrm{hb}}$}

An ordering <binary relation> used by a <memory model> to constrain observation of shared data. For the <mutex> example, T1's write precedes its release, that release synchronizes with T2's successful acquisition, and that acquisition precedes T2's read. Together these steps order the write before the read. Wall-clock timing alone does not establish <happens-before>.<Working Draft, Standard for Programming Language C++ (N4861)>{ref}