|
Boost : |
From: Ion Gaztañaga (ion_g_m_at_[hidden])
Date: 2005-06-10 00:03:58
Hi Jody,
Shmem null mutex was just a fast implementation mainly to avoid mutex
overhead with shmem machinery when used with non-shared memory buffers, so I
if boost::thread, accepts a null mutex, I would happily use that. I haven't
checked your patches, but I would expect a zero overhead mutex, regarding
its size (eliminated using empty base optimization) and code generation
(lock and unlock are empty functions).
Regards,
Ion
----- Original Message -----
From: "Jody Hagins" <jody-boost-011304_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Thursday, June 09, 2005 10:03 PM
Subject: Re: [boost] Re: [thread] null_mutex
> On Thu, 9 Jun 2005 21:41:31 +0200
> "Pavel Vozenilek" <pavel_vozenilek_at_[hidden]> wrote:
>
>>
>> "Jody Hagins" wrote:
>>
>> > Looking through the archives, a number of requests have been made
>> > for a null_mutex, but none exist.
>> >
>> An implementation exists in Shmem library (in Sandbox files).
>
>
> OK, thanks. A few comments...
>
> Your class is missing:
> scoped_timed_lock
> void do_lock(cv_state &);
> void do_unlock(cv_state &);
>
> which is probably not a big deal if it only used for shmem, and only
> used with shmem::shared_condition.
>
> However, you would not be able to use this class as a drop-in
> replacement for any of the other thread::*mutex classes, because it
> would require reasonable interoperability with boost::condition.
>
>
>
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk