|
Boost : |
Subject: Re: [boost] [interprocess] More robust message_queue and interprocess_condition?
From: Ross MacGregor (gordonrossmacgregor_at_[hidden])
Date: 2011-05-06 18:57:41
kopo <kopinskc <at> msoe.edu> writes:
> Ross MacGregor wrote:
> > I am using the "Solution 1" modification to the library myself.
>
> I meant to reply to your original message with proposed solutions but
> clicked on the wrong post. I definitely thought that your first solution was
> probably the best, and plan on using it if no other solutions can be found.
I am considering a slight modification to this solution, I will post
it in more detail when I get time. Basically, instead of changing
interprocess_condition we should modify the interprocess_mutex lock
function to time out instead. The lock function could simply call
through to timed_lock() and throw an exception if it times out. This
would be more effective change for the library.
> When I say non-invasive solution it would be best not to modify the library
> so that other people that wish to use my API could do so with the existing
> BOOST code base and not have to take out a specially modified version.
Yes, that is a real problem for a library writer. I am using 1.44 right
now, and I also needed to patch interprocess it to work around the boot
time folder problem. Use the boost bug tracker to check the status of
your release.
Since the library is completely header file based, you may be able to
replace one or more of the boost header files for your own. It would be
a REAL hack job though (making use of the include guards).
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk