Boost C++ Libraries: Ticket #9471: Synchronization documentation nits https://svn.boost.org/trac10/ticket/9471 <p> The page <a href="http://www.boost.org/doc/libs/1_55_0/doc/html/thread/synchronization.html">http://www.boost.org/doc/libs/1_55_0/doc/html/thread/synchronization.html</a> has a number of minor hiccups when reading it. Here are some suggested corrections. </p> <p> Section: Concurrent threads of execution </p> <p> "On C++11 (Boost) concurrent execution of a component is obtained by means of the std::thread(boost::thread):" </p> <p> should read </p> <p> "In C++11 (Boost) concurrent execution of a component is obtained by means of the std::thread (boost::thread) class:" </p> <p> Section: Internal locking </p> <p> "The above example works well as long as the bankAgent and Joe doesn't access <a class="missing wiki">JoesAccount</a> at the same time." </p> <p> should read </p> <p> "The above example works well as long as the components bankAgent and Joe don't access <a class="missing wiki">JoesAccount</a> at the same time." </p> <p> "Mutex is a simple and basic mechanism for obtaining synchronization." </p> <p> should read </p> <p> "A mutex is a simple and basic mechanism..." </p> <p> "In the code below, guard's constructor locks the passed-in object this, and guard's destructor unlocks this." </p> <p> It doesn't lock 'this', which is 'guard', it locks 'mtx_'. This should read </p> <p> "In the code below, guard's constructor locks the passed-in object mtx_, and guard's destructor unlocks mtx." </p> <p> "Notice that the code above doesn't compiles, the mtx_ field is private." </p> <p> should read </p> <p> "Notice that the code above doesn't compile, the mtx_ field is private." </p> <p> "make mtx_ public which seams odd" </p> <p> should read </p> <p> "make mtx_ public which seems odd" </p> <p> Section: External Locking -- strict_lock and externally_locked classes </p> <p> "This tutorial is an adaptation of the paper of Andrei Alexandrescu..." </p> <p> should read </p> <p> "This tutorial is an adaptation of the paper by Andrei Alexandrescu..." </p> <p> Section: Locks as Permits </p> <p> All the other section titles capitalize only the first word of the title, why is Permits capitalized here? </p> <p> Before the first code block, the text says: </p> <p> "While we're at it, let's disable operator new and operator delete." </p> <p> but the code block shown doesn't do this, it uses C++11 delete syntax to remove the default constructor, copy constructor and assignment operator, but not operator new and delete. </p> <p> "Now, if you want the benefit of internal locking, you simply call Deposit(int) and Withdraw(int)." </p> <p> The method signatures for Deposit and Withdraw in this sentence are not in a fixed-width font. </p> <p> Section: Allowing other strict locks </p> <p> "As unique_lock is not a strict lock the following code doesn't compiles:" </p> <p> should read </p> <p> "As unique_lock is not a strict lock the following code doesn't compile:" </p> <p> "We need a way to transfer the ownership from the unique_lock to a strict_lock the time we are working with savingsAcct_..." </p> <p> should read </p> <p> "We need a way to transfer the ownership from the unique_lock to a strict_lock during the time we are working with savingsAcct_..." </p> <p> "Store which kind of reference we have stored,and in the destructor..." </p> <p> should read </p> <p> "We also need to store which kind of reference we have stored, and in the destructor..." </p> <p> "This seams too complicated to me." </p> <p> should read </p> <p> "This seems too complicated to me." </p> <p> "...we need either to duplicate every function taking a strict_lock or make these function templates functions." </p> <p> should read </p> <p> "...we need either to duplicate every function taking a strict_lock or make these function templates." </p> <p> "We must add some static metafunction that check that the Locker parameter is a strict lock." </p> <p> should read </p> <p> "We must add some static metafunction that checks that the Locker parameter is a strict lock." </p> <p> "We need to belive it "sur parole"." </p> <p> should read </p> <p> "We need to believe it "sur parole"." </p> <p> ("sur parole"? Use an appropriate English expression. I googled this and couldn't find anything except a translation from French.) </p> <p> "Well let me show how this nested_strict_lock clss looks like and..." </p> <p> should read </p> <p> "Well let me show what this nested_strict_lock_class looks like and..." </p> <p> "On destruction he will restore the ownership." </p> <p> should read </p> <p> "On destruction it will restore the ownership." </p> <p> "Note also that the Locker needs to have already a reference to the mutex otherwise an exception is thrown and the use of the lock_traits." </p> <p> This is pretty awkward wording; it should read </p> <p> "Note the use of lock_traits and that the Locker needs to have a reference to the mutex otherwise and exception is thrown." </p> <p> OK, there are probably more, but that's all I have time for right now. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/9471 Trac 1.4.3 viboes Thu, 05 Dec 2013 21:57:05 GMT owner, status changed https://svn.boost.org/trac10/ticket/9471#comment:1 https://svn.boost.org/trac10/ticket/9471#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> </ul> <p> Thanks for all these corrections. Don't hesitate to send more. </p> Ticket viboes Sat, 11 Jan 2014 11:24:52 GMT milestone changed https://svn.boost.org/trac10/ticket/9471#comment:2 https://svn.boost.org/trac10/ticket/9471#comment:2 <ul> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.56.0</span> </li> </ul> Ticket viboes Sat, 11 Jan 2014 11:55:43 GMT <link>https://svn.boost.org/trac10/ticket/9471#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9471#comment:3</guid> <description> <p> <a class="ext-link" href="https://github.com/boostorg/thread/commit/4148842426348d1a591f819ca9143af4fb9cae56"><span class="icon">​</span>https://github.com/boostorg/thread/commit/4148842426348d1a591f819ca9143af4fb9cae56</a> </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Tue, 25 Feb 2014 07:02:23 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/9471#comment:4 https://svn.boost.org/trac10/ticket/9471#comment:4 <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> <a class="ext-link" href="https://github.com/boostorg/thread/commit/750c849b0f0dff79a289111955260a4147ac7f59"><span class="icon">​</span>https://github.com/boostorg/thread/commit/750c849b0f0dff79a289111955260a4147ac7f59</a> </p> Ticket