<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>mikeash.com pyblog/friday-qa-2013-08-16-lets-build-dispatch-groups.html comments</title><link>http://www.mikeash.com/?page=pyblog/friday-qa-2013-08-16-lets-build-dispatch-groups.html#comments</link><description>mikeash.com Recent Comments</description><lastBuildDate>Sat, 06 Jun 2026 20:22:24 GMT</lastBuildDate><generator>PyRSS2Gen-1.0.0</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Paul Fennema - 2013-10-29 08:42:41</title><link>http://www.mikeash.com/?page=pyblog/friday-qa-2013-08-16-lets-build-dispatch-groups.html#comments</link><description>Hi Mike,
&lt;br /&gt;
&lt;br /&gt;What is the advantage to use your implementation (MADispatchGroup) instead of using the standard dispatch_group calls as in your excellent example?</description><guid isPermaLink="true">06bfb2b7aa5876f9c7b04e84e863da32</guid><pubDate>Tue, 29 Oct 2013 08:42:41 GMT</pubDate></item><item><title>Daniel Steffen - 2013-08-17 19:00:27</title><link>http://www.mikeash.com/?page=pyblog/friday-qa-2013-08-16-lets-build-dispatch-groups.html#comments</link><description>It may be instructive to compare with the implementation in libdispatch:
&lt;br /&gt;&lt;a href="http://libdispatch.macosforge.org/trac/browser/trunk/src/semaphore.c"&gt;http://libdispatch.macosforge.org/trac/browser/trunk/src/semaphore.c&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;Note that &lt;code&gt;dispatch_group_notify&lt;/code&gt; can be called multiple times for a single group (in addition to one or more &lt;code&gt;dispatch_group_wait&lt;/code&gt;s), it maintains a queue of notifiers that is traversed when the group becomes empty.
&lt;br /&gt;&amp;nbsp;
&lt;br /&gt;(&lt;code&gt;ma_dispatch_group_notify&lt;/code&gt; also leaks the previous block if it is called more than once. That could be fixed with &lt;code&gt;__sync_swap&lt;/code&gt; even if you didn't want to support more than a single notifier.)</description><guid isPermaLink="true">cc7e28b55932207061d2f368b4193490</guid><pubDate>Sat, 17 Aug 2013 19:00:27 GMT</pubDate></item></channel></rss>
