[ITK Community] [Insight-developers] ITK MutexLock(s) missing try lock

Bradley Lowekamp blowekamp at mail.nih.gov
Wed Mar 12 13:55:34 EDT 2014


Hello,

I wanted to add a little safety to a section of code in SimpleITK. So I wanted to add a mutex lock around a critical section, and if second thread tried to execute it, then an exceptions should be thrown.

I thought a mutex lock was the appropriate tool. So I looked at ITK's SimpleMutexLock[1], and SimpleFastMutexLock[2]. Unfortunately the expected "TryLock" was missing.

I could also use an atomic integer as the lock/flag, but that's not available either.

Any suggestions? This ought to be some where in ITK!

Thanks,
Brad


[1] http://www.itk.org/Doxygen/html/classitk_1_1SimpleMutexLock.html
[2] http://www.itk.org/Doxygen/html/classitk_1_1SimpleFastMutexLock.html
_______________________________________________
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://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-developers



More information about the Community mailing list