Hi Roland, The reason we don't support the higher-level "wrapper" libraries like C++, Fortran, and the high-level (HL) library is that the global lock is at the C API call level, not the wrapper level. Some of these wrapper API calls make multiple C API calls and a context switch during the wrapper call could cause problems.
I say "could" because we have not performed a careful analysis of the issue; we only know that it's a possibility. Hence the labeling of the "wrapper + thread-safe" as "unsupported". The combination can be enabled by turning on unsupported features at configure time, but I would not advise this for important/production software due to the obvious risk of run-time issues. Analyzing and addressing this is on our to-do list, but it hasn't yet moved to the head of the queue. As for changes between 1.8.10 and 1.8.14, that was probably a result of us bringing CMake up to speed with what the POSIX autotools allow. CMake support was only added (relatively) recently, so we're still working at making it and the autotools behave identically. The autotools have required "unsupported combination" support for thread-safety + C++/Fortran for a long time. The high-level library has not been prohibited under thread-safety, but that was an oversight that will probably be corrected in 1.8.15 in both CMake and the autotools. Cheers, Dana > -----Original Message----- > From: Hdf-forum [mailto:[email protected]] On Behalf Of > Roland Schwarz > Sent: Tuesday, February 03, 2015 3:18 AM > To: HDF Users Discussion List > Subject: [Hdf-forum] Multithreading and CPP > > Dear HDF community! > > While I was trying to build the current (1.8.14) library with the mingw > compiler I discovered that the library > > a) cannot be built as a static library > b) built with C++ interfaces > > if I need the lib in multithread safe variant. > > While I understand that a) currently is a problem until a mechanism to > release thread local storage on thread exit is implemented, I do not > understand the restriction on b). Can anyone please explain why the C++ > interfaces cannot be built thread safe, as it was possible with 1.8.10? > > Thank you very much, > Roland > > BTW.: This restrictions are not mingw specific, msvc is the same. > > _______________________________________________ > Hdf-forum is for HDF software users discussion. > [email protected] > http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org > Twitter: https://twitter.com/hdf5 _______________________________________________ Hdf-forum is for HDF software users discussion. [email protected] http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org Twitter: https://twitter.com/hdf5
