1 Apr 2011 01:04
Re: boost interprocess (>1.45) robust mutexes
Kim Barrett <kab.conundrums <at> verizon.net>
2011-03-31 23:04:16 GMT
2011-03-31 23:04:16 GMT
On Mar 31, 2011, at 4:30 PM, Ion Gaztañaga wrote:
> El 31/03/2011 21:04, Kim Barrett escribió:
>> On Mar 31, 2011, at 2:41 PM, Kim Barrett wrote:
>>> I developed an API for robust mutexes and associated condition
>>> variables that has been in use for a while by my employer.
>
> Thanks for the ideas. That would require adding a handler function to lock types, right? How does this work
with a typical condition variable wait loop? Shouldn't we notify the result to the caller?
Yes, the lock type associated with robust mutexes also needs to have
its locking and constructor functions take a handler function.
The caller provides the handler function.
So one has something like
class robust_mutex {
public:
... constructors & etc ...
template<class Handler>
void lock(Handler handler);
void unlock();
void set_consistent();
void set_unrecoverable();
};
class robust_lock {
(Continue reading)
RSS Feed