[ITK-users] [ITK] Readers/writer lock in ITK?
Simon Alexander
skalexander at gmail.com
Fri Mar 21 11:33:48 EDT 2014
Hi Taylor,
shared_mutex was rejected from c++ 2011, but is a target for c++ 2014 if I
understand correctly.
Boost synchronization probably covers what you need:
http://www.boost.org/doc/libs/1_55_0/doc/html/thread/synchronization.html
If you are avoiding boost for some reason, There are reference
implementations like :
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2406.html#shared_mutex
hope that helps!
On Fri, Mar 21, 2014 at 10:51 AM, Taylor Braun-Jones <taylor at braun-jones.org
> wrote:
> Hi Luis,
>
> I could implement a readers/writer lock on top of itk::Semapore, but I'd
> rather not. To quote Wikipedia:
>
> Readers-writer locks are usually constructed on top of mutexes and
> condition variables, or on top of semaphores.
>
> I'm looking for something equivalent to these higher level classes that Qt
> provides (without having to pull in a Qt dependency):
>
> http://qt-project.org/doc/qt-4.8/qreadwritelock.html
> http://qt-project.org/doc/qt-4.8/qreadlocker.html
> http://qt-project.org/doc/qt-4.8/qwritelocker.html
>
> Thanks,
>
> Taylor
>
>
> On Fri, Mar 21, 2014 at 10:21 AM, Luis Ibanez <luis.ibanez at kitware.com>wrote:
>
>> Hi Taylor,
>>
>> Could the ITK Semaphore class
>>
>> http://www.itk.org/Doxygen318/html/classitk_1_1Semaphore.html
>>
>>
>> help with what you are trying to do ?
>>
>>
>> Please let us know,
>>
>> Thanks
>>
>> Luis
>>
>>
>>
>> On Fri, Mar 21, 2014 at 9:52 AM, Taylor Braun-Jones <
>> taylor at braun-jones.org> wrote:
>>
>>> Hello Insight-users,
>>>
>>> I have a code base that has standardized on itk::*MutexLock classes for
>>> thread protection, which work great. Now I have a use case that requires a
>>> more sophisticated readers/writer lock [1] but I don't see anything in ITK
>>> which seems surprising to me. Have I missed something? Any suggestions?
>>>
>>> Thanks!
>>>
>>> - Taylor
>>>
>>> [1] https://en.wikipedia.org/wiki/Readers-writer_lock
>>>
>>> _____________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Kitware offers ITK Training Courses, for more information visit:
>>> http://www.kitware.com/products/protraining.php
>>>
>>> Please keep messages on-topic and check the ITK FAQ at:
>>> http://www.itk.org/Wiki/ITK_FAQ
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.itk.org/mailman/listinfo/insight-users
>>>
>>> _______________________________________________
>>> Community mailing list
>>> Community at itk.org
>>> http://public.kitware.com/cgi-bin/mailman/listinfo/community
>>>
>>>
>>
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20140321/97de80ac/attachment.html>
More information about the Insight-users
mailing list