Bug #408 » 0002-thread-safeish-dcmsr-behaviour-for-ancient-compilers.patch
| dcmsr/include/dcmtk/dcmsr/dsrtlist.h | ||
|---|---|---|
|
/// the list maintained by this class
|
||
|
OFList<T> ItemList;
|
||
|
};
|
||
|
// ensure emptyItem() is called before main() for at least thread-safeish behaviour
|
||
|
// when not using a c++11 compiler.
|
||
|
#if __cplusplus < 201103L
|
||
|
private:
|
||
|
|
||
|
struct init_threadsafe
|
||
|
{
|
||
|
init_threadsafe()
|
||
|
{
|
||
|
emptyItem();
|
||
|
}
|
||
|
};
|
||
|
static init_threadsafe init_ts;
|
||
|
};
|
||
|
// implement static member for any instantiation
|
||
|
template<class T>
|
||
|
OFTypename DSRListOfItems<T>::init_threadsafe DSRListOfItems<T>::init_ts;
|
||
|
#else
|
||
|
};
|
||
|
#endif // c++11
|
||
|
#endif
|
||
- « Previous
- 1
- 2
- Next »