Boost C++ Libraries: Ticket #12416: Windows: shared_mutex::state_data exceptions thrown in synthetic tests https://svn.boost.org/trac10/ticket/12416 <p> Hi, My name is Tomer Gal. </p> <p> We have created synthetic benchmarks in which we create many threads. This causes shared_mutex to throw an exception when it has more than 2047 waiting threads due to the following limits: </p> <blockquote> <p> struct state_data { </p> <blockquote> <p> unsigned shared_count:11, </p> <blockquote> <p> shared_waiting:11, exclusive:1, upgrade:1, exclusive_waiting:7, exclusive_waiting_blocked:1; </p> </blockquote> </blockquote> </blockquote> <p> Obviously, creating more than 2047 threads waiting for a lock is too much for 'normal' code... however, the boost library shouldn't be the limiting factor for such a usage in my opinion. </p> <p> The state_data is currently limited to the size of(long) which is 32 bits, and it looks like it could be increased to 64 bits. </p> <p> Could this be fixed? </p> <p> Regards, Tomer Gal, CTO at <a class="missing wiki">OpTeamizer</a> </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12416 Trac 1.4.3 viboes Wed, 31 Aug 2016 16:48:43 GMT owner, status, summary changed https://svn.boost.org/trac10/ticket/12416#comment:1 https://svn.boost.org/trac10/ticket/12416#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>summary</strong> <span class="trac-field-old">shared_mutex::state_data exceptions thrown in synthetic tests</span> → <span class="trac-field-new">Windows: shared_mutex::state_data exceptions thrown in synthetic tests</span> </li> </ul> <p> Hi, I'm unable to test this on Windows. Could you provide a github PR? </p> Ticket Tomer.Gal@… Fri, 16 Sep 2016 09:37:24 GMT <link>https://svn.boost.org/trac10/ticket/12416#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12416#comment:2</guid> <description> <p> Hi, This issue is readable in the code: state_data::shared_waiting:11 - There is an 11 bits counter for the amount of waiting threads. This represents a max value of 2047 waiting threads, if this limit overflows, boost throws an exception. </p> <p> Yes, I will find the time to issue a PR. </p> <p> Regards, Tomer Gal (<a class="missing wiki">OpTeamizer</a>) </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Tue, 03 Jan 2017 06:53:05 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12416#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12416#comment:3</guid> <description> <p> Thanks, the first implementer of Boost.Thread believed surely that this was enough. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Sun, 29 Jan 2017 16:51:04 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12416#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12416#comment:4</guid> <description> <p> I believe it is not worth fixing this issue, as having 2047 sharing some resource is not a real issue. </p> <p> I proposes to document this restriction on the documentation. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Sun, 19 Feb 2017 10:53:41 GMT</pubDate> <title>type changed https://svn.boost.org/trac10/ticket/12416#comment:5 https://svn.boost.org/trac10/ticket/12416#comment:5 <ul> <li><strong>type</strong> <span class="trac-field-old">Bugs</span> → <span class="trac-field-new">Feature Requests</span> </li> </ul> Ticket