diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-08-31 13:57:25 -0600 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-08-31 13:57:25 -0600 |
commit | 4a1bcc63cd2919f74f29b41c7b000f80da7449f4 (patch) | |
tree | cb213c45c610bff106761bbc0d4117ba6c0f8bd1 /common/definitions.h | |
parent | bbf14304d1112882c20f4ad3818712cdfecdedaa (diff) | |
download | sink-4a1bcc63cd2919f74f29b41c7b000f80da7449f4.tar.gz sink-4a1bcc63cd2919f74f29b41c7b000f80da7449f4.zip |
Avoid non threadsafe initialization.
local static initialization is only threadsafe if initialized on
construction. The other codepath is not threadsafe, but is only used in
testcode.
Diffstat (limited to 'common/definitions.h')
-rw-r--r-- | common/definitions.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/common/definitions.h b/common/definitions.h index ce9e794..7ef215b 100644 --- a/common/definitions.h +++ b/common/definitions.h | |||
@@ -25,10 +25,16 @@ | |||
25 | #include <QByteArray> | 25 | #include <QByteArray> |
26 | 26 | ||
27 | namespace Sink { | 27 | namespace Sink { |
28 | void SINK_EXPORT clearLocationCache(); | ||
29 | QString SINK_EXPORT storageLocation(); | 28 | QString SINK_EXPORT storageLocation(); |
30 | QString SINK_EXPORT dataLocation(); | 29 | QString SINK_EXPORT dataLocation(); |
31 | QString SINK_EXPORT configLocation(); | 30 | QString SINK_EXPORT configLocation(); |
32 | QString SINK_EXPORT temporaryFileLocation(); | 31 | QString SINK_EXPORT temporaryFileLocation(); |
33 | QString SINK_EXPORT resourceStorageLocation(const QByteArray &resourceInstanceIdentifier); | 32 | QString SINK_EXPORT resourceStorageLocation(const QByteArray &resourceInstanceIdentifier); |
33 | |||
34 | /** | ||
35 | * Clear the location cache and lookup locations again. | ||
36 | * | ||
37 | * Warning: Calling this results in non-threadsafe initialization, only use it in test-code. | ||
38 | */ | ||
39 | void SINK_EXPORT clearLocationCache(); | ||
34 | } | 40 | } |