Boost C++ Libraries: Ticket #9285: CreateMutex return NULL if failed
https://svn.boost.org/trac10/ticket/9285
<p>
winapi_mutex_wrapper.hpp line 149
</p>
<p>
The invalid handle for mutex is NULL(0), not winapi::invalid_handle_value(-1).
</p>
en-usBoost C++ Libraries/htdocs/site/boost.png
https://svn.boost.org/trac10/ticket/9285
Trac 1.4.3Ion GaztañagaSun, 27 Oct 2013 12:27:36 GMT
<link>https://svn.boost.org/trac10/ticket/9285#comment:1 </link>
<guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9285#comment:1</guid>
<description>
<p>
Thanks for the report. It will changed to handle a nullptr. winapi_mutex_wrapper also shares the same bug described in your <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/9288" title="#9288: Bugs: timed_wait does not check if has expired (closed: fixed)">#9288</a> ("timed_wait does not check if has expired") ticket.
</p>
</description>
<category>Ticket</category>
</item>
<item>
<dc:creator>Ion Gaztañaga</dc:creator>
<pubDate>Sun, 27 Oct 2013 12:28:56 GMT</pubDate>
<title>status changed; resolution set
https://svn.boost.org/trac10/ticket/9285#comment:2
https://svn.boost.org/trac10/ticket/9285#comment:2
<ul>
<li><strong>status</strong>
<span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span>
</li>
<li><strong>resolution</strong>
→ <span class="trac-field-new">fixed</span>
</li>
</ul>
<p>
(In <a class="changeset" href="https://svn.boost.org/trac10/changeset/86476" title="Fixes #9285">[86476]</a>) Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/9285" title="#9285: Bugs: CreateMutex return NULL if failed (closed: fixed)">#9285</a>
</p>
Tickethuyuguang@…Mon, 28 Oct 2013 02:51:05 GMT
<link>https://svn.boost.org/trac10/ticket/9285#comment:3 </link>
<guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9285#comment:3</guid>
<description>
<p>
Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/9285#comment:1" title="Comment 1">igaztanaga</a>:
</p>
<blockquote class="citation">
<p>
Thanks for the report. It will changed to handle a nullptr. winapi_mutex_wrapper also shares the same bug described in your <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/9288" title="#9288: Bugs: timed_wait does not check if has expired (closed: fixed)">#9288</a> ("timed_wait does not check if has expired") ticket.
</p>
</blockquote>
<p>
I suggest you remove the #define BOOST_INTERPROCESS_FORCE_GENERIC_EMULATION in workaround.hpp
</p>
<table class="wiki">
<tr>#if defined(_WIN32) <td> defined(<span class="underline">WIN32</span>) </td><td> defined(WIN32)
</td></tr></table>
<blockquote>
<p>
#define BOOST_INTERPROCESS_WINDOWS
#define BOOST_INTERPROCESS_FORCE_GENERIC_EMULATION
#define BOOST_INTERPROCESS_HAS_KERNEL_BOOTTIME
</p>
</blockquote>
<p>
If a server need to handle multiple message queue, for example, 64 queues, the spinlock would kill too much cpu.
Also, if possible, I hope you can implement two more function which are multi_timed_recv and multi_timed_send, so that I can wait multiple queue and do not need to lanuch many threads for every queues.
</p>
</description>
<category>Ticket</category>
</item>
<item>
<dc:creator>Ion Gaztañaga</dc:creator>
<pubDate>Mon, 28 Oct 2013 17:03:39 GMT</pubDate>
<title/>
<link>https://svn.boost.org/trac10/ticket/9285#comment:4 </link>
<guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9285#comment:4</guid>
<description>
<p>
Native synchronization primitives are experimental so they are not enabled by default. spinlock handling will be improved in Boost 1.55 so CPU usage will be pretty low.
</p>
</description>
<category>Ticket</category>
</item>
<item>
<dc:creator>anonymous</dc:creator>
<pubDate>Tue, 29 Oct 2013 01:53:15 GMT</pubDate>
<title/>
<link>https://svn.boost.org/trac10/ticket/9285#comment:5 </link>
<guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9285#comment:5</guid>
<description>
<p>
Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/9285#comment:4" title="Comment 4">igaztanaga</a>:
</p>
<blockquote class="citation">
<p>
Native synchronization primitives are experimental so they are not enabled by default. spinlock handling will be improved in Boost 1.55 so CPU usage will be pretty low.
</p>
</blockquote>
<p>
I just checked the latest code boost 1.55 beta, now the spinlock use _mm_pause. Maybe it will be better, but I really really want you implement a actor based message queue. I hope I can write the code as async_recv(queue, buffer_ptr, [buffer_ptr](size_t cb) {}), and I can handle multiple queues's recv and send in one thread.
</p>
</description>
<category>Ticket</category>
</item>
</channel>
</rss>