ge-example' class='heading'>Usage Example:</h3>
<pre class="highlight swift"><code> <span class="c1">//Wait for all of the listeners to stop.</span>
 <span class="kt">ListenerGroup</span><span class="o">.</span><span class="nf">waitForListeners</span><span class="p">()</span>

 <span class="c1">//Enqueue a block of code on a given queue, assigning it to the listener group in the process (so we can wait on it later).</span>
 <span class="kt">ListenerGroup</span><span class="o">.</span><span class="nf">enqueu