openexr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Openexr-devel] Thread safety


From: Bob Friesenhahn
Subject: Re: [Openexr-devel] Thread safety
Date: Wed, 3 Apr 2013 13:10:23 -0500 (CDT)
User-agent: Alpine 2.01 (GSO 1266 2009-07-14)

On Wed, 3 Apr 2013, Christopher Horvath wrote:

My vote for the default would be to use the std::thread library, as part of the 
C++11 standard. 

Given that it is only 2013 now, hardly anyone can be assured to have C++11 threads or even a compliant compiler.

OpenMP 2.0 is quite widely available and solid except that 'clang' does not seem to support it yet (other than via llvm-gcc wrapper). The fact that it is based on pragmas should not cause any fear. The ability to build the code without OpenMP is a considerable benefit.

OpenMP supports efficient lock primitives but does not support condition variables yet (as far as I am aware) so waiting/queuing between threads is not as effective as it might be. Such designs are best avoided unless it is ok to rely on the pthreads API. My own software is currently depending on the pthreads API for some of its locking (without problems).

If OpenEXR depends on an add-on library for its threading, one would hope that the library is very portable, open sourced, easy to compile, and that its usage license is compatible with OpenEXR's existing license.

Bob
--
Bob Friesenhahn
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]