Boost C++ Libraries: Ticket #7370: Boost.Thread documentation https://svn.boost.org/trac10/ticket/7370 <p> The following phrase under <a class="missing wiki">UpgradeLockable</a> Concept should be corrected (it was copy-pasted from <a class="missing wiki">SharedLockable</a> Concept without change): </p> <p> "A type L meets the <a class="missing wiki">SharedLockable</a> requirements if it meets the <a class="missing wiki">TimedLockable</a> requirements and the following expressions are well-formed and have the specified semantics." </p> <p> -&gt; </p> <p> "A type L meets the <a class="missing wiki">UpgradeLockable</a> requirements if it meets the <a class="missing wiki">SharedLockable</a> requirements and the following expressions are well-formed and have the specified semantics." </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7370 Trac 1.4.3 viboes Thu, 13 Sep 2012 19:03:29 GMT owner, status, version changed https://svn.boost.org/trac10/ticket/7370#comment:1 https://svn.boost.org/trac10/ticket/7370#comment:1 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Anthony Williams</span> to <span class="trac-author">viboes</span> </li> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> <li><strong>version</strong> <span class="trac-field-old">Boost 1.52.0</span> → <span class="trac-field-new">Boost 1.51.0</span> </li> </ul> Ticket viboes Thu, 13 Sep 2012 19:03:51 GMT milestone changed https://svn.boost.org/trac10/ticket/7370#comment:2 https://svn.boost.org/trac10/ticket/7370#comment:2 <ul> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.52.0</span> </li> </ul> <p> Committed in trunk revision 80517. </p> Ticket Valentin Shtronda <valiko.ua@…> Fri, 14 Sep 2012 08:13:33 GMT <link>https://svn.boost.org/trac10/ticket/7370#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7370#comment:3</guid> <description> <p> More cosmetic issues on the same page: 2) Extra bracket: m.unlock_upgrade_and_lock();] -&gt; m.unlock_upgrade_and_lock(); </p> <p> 3) This phrase looks corrupted: "Let pm be and owns the ownership state." </p> </description> <category>Ticket</category> </item> <item> <author>Valentin Shtronda <valiko.ua@…></author> <pubDate>Fri, 14 Sep 2012 08:38:06 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7370#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7370#comment:4</guid> <description> <p> 4) There are many double underscores (<span class="underline">) in the text that seems need to be corrected. </span></p> </description> <category>Ticket</category> </item> <item> <author>Valentin Shtronda <valiko.ua@…></author> <pubDate>Fri, 14 Sep 2012 08:43:48 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7370#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7370#comment:5</guid> <description> <p> 4) for example, <code>__shared_lock_guard_ca</code> -&gt; <code>shared_lock_guard</code> </p> </description> <category>Ticket</category> </item> <item> <author>Valentin Shtronda <valiko.ua@…></author> <pubDate>Mon, 17 Sep 2012 16:40:57 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7370#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7370#comment:6</guid> <description> <p> 5) Documentation for "<a class="missing wiki">BasicLockable</a> Concept::unlock()" says it does not throw but implementation throws exception if lock is not owned. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Mon, 17 Sep 2012 21:16:20 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7370#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7370#comment:7</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/7370#comment:6" title="Comment 6">Valentin Shtronda &lt;valiko.ua@…&gt;</a>: </p> <blockquote class="citation"> <p> 5) Documentation for "<a class="missing wiki">BasicLockable</a> Concept::unlock()" says it does not throw but implementation throws exception if lock is not owned. </p> </blockquote> <p> Please, could you point where the implementation is throwing? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Mon, 17 Sep 2012 21:32:02 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7370#comment:8 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7370#comment:8</guid> <description> <p> I have updated the doc to fix the typos. </p> <p> Committed in trunk revision <a class="changeset" href="https://svn.boost.org/trac10/changeset/80565" title="Thread: fix some typos">[80565]</a>. </p> </description> <category>Ticket</category> </item> <item> <author>Valentin Shtronda <valiko.ua@…></author> <pubDate>Tue, 18 Sep 2012 09:42:35 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7370#comment:9 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7370#comment:9</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/7370#comment:7" title="Comment 7">viboes</a>: </p> <blockquote class="citation"> <p> Please, could you point where the implementation is throwing? </p> </blockquote> <p> boost_1_51_0\boost\thread\locks.hpp, lines 598, 869, 1100. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Sun, 23 Sep 2012 12:40:34 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7370#comment:10 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7370#comment:10</guid> <description> <p> Committed revision <a class="changeset" href="https://svn.boost.org/trac10/changeset/80668" title="Thread: Merge from trunk">[80668]</a>. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Sun, 23 Sep 2012 12:48:42 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7370#comment:11 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7370#comment:11</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/7370#comment:9" title="Comment 9">Valentin Shtronda &lt;valiko.ua@…&gt;</a>: </p> <blockquote class="citation"> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/7370#comment:7" title="Comment 7">viboes</a>: </p> <blockquote class="citation"> <p> Please, could you point where the implementation is throwing? </p> </blockquote> <p> boost_1_51_0\boost\thread\locks.hpp, lines 598, 869, 1100. </p> </blockquote> <p> It would be great if unique_lock/shared_lock <a class="missing wiki">BasicLockable</a> but they aren't. Where have you read that the locks defined there are a model of <a class="missing wiki">BasicLockable</a>? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Mon, 24 Sep 2012 06:04:50 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7370#comment:12 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7370#comment:12</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/7370#comment:11" title="Comment 11">viboes</a>: </p> <blockquote class="citation"> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/7370#comment:9" title="Comment 9">Valentin Shtronda &lt;valiko.ua@…&gt;</a>: </p> <blockquote class="citation"> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/7370#comment:7" title="Comment 7">viboes</a>: </p> <blockquote class="citation"> <p> Please, could you point where the implementation is throwing? </p> </blockquote> <p> boost_1_51_0\boost\thread\locks.hpp, lines 598, 869, 1100. </p> </blockquote> <p> It would be great if unique_lock/shared_lock <a class="missing wiki">BasicLockable</a> but they aren't. Where have you read that the locks defined there are a model of <a class="missing wiki">BasicLockable</a>? </p> </blockquote> <p> Hrr, I've found it </p> <p> " </p> <blockquote> <p> Specializations of boost::unique_lock model the <a class="missing wiki">TimedLockable</a> concept if the supplied Lockable type itself models <a class="missing wiki">TimedLockable</a> concept (e.g. boost::unique_lock&lt;boost::timed_mutex&gt;), or the Lockable concept if the supplied Lockable type itself models Lockable concept (e.g. boost::unique_lock&lt;boost::mutex&gt;), or the <a class="missing wiki">BasicLockable</a> concept if the supplied Lockable type itself models <a class="missing wiki">BasicLockable</a> concept. </p> </blockquote> <p> " </p> <p> I will remove this with a note explaining why they are not model of <a class="missing wiki">TimedLockable</a>. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Mon, 24 Sep 2012 21:13:43 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/7370#comment:13 https://svn.boost.org/trac10/ticket/7370#comment:13 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/7370#comment:12" title="Comment 12">viboes</a>: </p> <blockquote class="citation"> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/7370#comment:11" title="Comment 11">viboes</a>: </p> <blockquote class="citation"> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/7370#comment:9" title="Comment 9">Valentin Shtronda &lt;valiko.ua@…&gt;</a>: </p> <blockquote class="citation"> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/7370#comment:7" title="Comment 7">viboes</a>: </p> <blockquote class="citation"> <p> Please, could you point where the implementation is throwing? </p> </blockquote> <p> boost_1_51_0\boost\thread\locks.hpp, lines 598, 869, 1100. </p> </blockquote> <p> It would be great if unique_lock/shared_lock <a class="missing wiki">BasicLockable</a> but they aren't. Where have you read that the locks defined there are a model of <a class="missing wiki">BasicLockable</a>? </p> </blockquote> <p> Hrr, I've found it </p> <p> " </p> <blockquote> <p> Specializations of boost::unique_lock model the <a class="missing wiki">TimedLockable</a> concept if the supplied Lockable type itself models <a class="missing wiki">TimedLockable</a> concept (e.g. boost::unique_lock&lt;boost::timed_mutex&gt;), or the Lockable concept if the supplied Lockable type itself models Lockable concept (e.g. boost::unique_lock&lt;boost::mutex&gt;), or the <a class="missing wiki">BasicLockable</a> concept if the supplied Lockable type itself models <a class="missing wiki">BasicLockable</a> concept. </p> </blockquote> <p> " </p> <p> I will remove this with a note explaining why they are not model of <a class="missing wiki">TimedLockable</a>. </p> </blockquote> <p> Howard Hinnant gave me the answer. "In the <a class="missing wiki">BasicLockable</a> requirements it says that it is undefined behavior to call m.unlock() unless the current execution agent holds the lock on m. And the only time shared_lock&lt;shared_mutex&gt;/unique_lock&lt;mutex&gt; could throw on unlock is if owns_lock() is false." </p> <p> So perhaps the library is good after all. </p> <p> I will close the issue. Please reopen it you don't agree. </p> Ticket Valentin Shtronda <valiko.ua@…> Tue, 25 Sep 2012 13:57:13 GMT <link>https://svn.boost.org/trac10/ticket/7370#comment:14 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7370#comment:14</guid> <description> <p> viboes, I cannot find information about undefined behavior on this page: <a href="http://www.boost.org/doc/libs/1_51_0/doc/html/thread/synchronization.html">http://www.boost.org/doc/libs/1_51_0/doc/html/thread/synchronization.html</a> Where do you see this? Even if it's said somewhere, I still find "Throws: Nothing" clearly saying it never throws. Look at documentation for m.lock(): it clearly says it can throw if an error occurs. Documentation for unlock() would be more helpful if it said that it can throw if lock is not owned. </p> </description> <category>Ticket</category> </item> </channel> </rss>