<p>This class implements the work-stealing queue described in the paper, "Correct and Efficient Work-Stealing for Weak Memory Models," available at <ahref="https://www.di.ens.fr/~zappa/readings/ppopp13.pdf">https:/<wbr/>/<wbr/>www.di.ens.fr/<wbr/>~zappa/<wbr/>readings/<wbr/>ppopp13.pdf</a>.</p><p>Only the queue owner can perform pop and push operations, while others can steal data from the queue.</p>
<p>attempts to steal a task with a hint mechanism</p>
<tableclass="m-table m-fullwidth m-flat">
<thead>
<tr><thcolspan="2">Parameters</th></tr>
</thead>
<tbody>
<tr>
<tdstyle="width: 1%">num_empty_steals</td>
<td>a reference to a counter tracking consecutive empty steal attempts</td>
</tr>
</tbody>
</table>
<p>This function tries to steal a task from the queue. If the steal attempt is successful, the stolen task is returned. Additionally, if the queue is empty, the provided counter <code>num_empty_steals</code> is incremented; otherwise, <code>num_empty_steals</code> is reset to zero.</p>
</div></section>
</section>
</div>
</div>
</div>
</article></main>
<divclass="m-doc-search" id="search">
<ahref="#!" onclick="return hideSearch()"></a>
<divclass="m-container">
<divclass="m-row">
<divclass="m-col-m-8 m-push-m-2">
<divclass="m-doc-search-header m-text m-small">
<div><spanclass="m-label m-default">Tab</span> / <spanclass="m-label m-default">T</span> to search, <spanclass="m-label m-default">Esc</span> to close</div>