Mercurial > hg > orthanc-stone
comparison Framework/Oracle/ThreadedOracle.h @ 1124:a8bf81756839 broker
unsuccessful attempt to cache ParseDicomFileCommand
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 05 Nov 2019 18:49:06 +0100 |
parents | 79b1b541fe15 |
children | 7aad0984d38a |
comparison
equal
deleted
inserted
replaced
1117:383aa2a7d426 | 1124:a8bf81756839 |
---|---|
23 | 23 |
24 #if !defined(ORTHANC_ENABLE_THREADS) | 24 #if !defined(ORTHANC_ENABLE_THREADS) |
25 # error The macro ORTHANC_ENABLE_THREADS must be defined | 25 # error The macro ORTHANC_ENABLE_THREADS must be defined |
26 #endif | 26 #endif |
27 | 27 |
28 #if !defined(ORTHANC_ENABLE_DCMTK) | |
29 # error The macro ORTHANC_ENABLE_DCMTK must be defined | |
30 #endif | |
31 | |
28 #if ORTHANC_ENABLE_THREADS != 1 | 32 #if ORTHANC_ENABLE_THREADS != 1 |
29 # error This file can only compiled for native targets | 33 # error This file can only compiled for native targets |
34 #endif | |
35 | |
36 #if ORTHANC_ENABLE_DCMTK == 1 | |
37 # include "../Toolbox/ParsedDicomFileCache.h" | |
30 #endif | 38 #endif |
31 | 39 |
32 #include "IOracle.h" | 40 #include "IOracle.h" |
33 #include "GenericOracleRunner.h" | 41 #include "GenericOracleRunner.h" |
34 #include "../Messages/IMessageEmitter.h" | 42 #include "../Messages/IMessageEmitter.h" |
60 std::vector<boost::thread*> workers_; | 68 std::vector<boost::thread*> workers_; |
61 boost::shared_ptr<SleepingCommands> sleepingCommands_; | 69 boost::shared_ptr<SleepingCommands> sleepingCommands_; |
62 boost::thread sleepingWorker_; | 70 boost::thread sleepingWorker_; |
63 unsigned int sleepingTimeResolution_; | 71 unsigned int sleepingTimeResolution_; |
64 | 72 |
73 #if ORTHANC_ENABLE_DCMTK == 1 | |
74 boost::shared_ptr<ParsedDicomFileCache> dicomCache_; | |
75 #endif | |
76 | |
65 void Step(); | 77 void Step(); |
66 | 78 |
67 static void Worker(ThreadedOracle* that); | 79 static void Worker(ThreadedOracle* that); |
68 | 80 |
69 static void SleepingWorker(ThreadedOracle* that); | 81 static void SleepingWorker(ThreadedOracle* that); |
81 | 93 |
82 void SetThreadsCount(unsigned int count); | 94 void SetThreadsCount(unsigned int count); |
83 | 95 |
84 void SetSleepingTimeResolution(unsigned int milliseconds); | 96 void SetSleepingTimeResolution(unsigned int milliseconds); |
85 | 97 |
98 void SetDicomCacheSize(size_t size); | |
99 | |
86 void Start(); | 100 void Start(); |
87 | 101 |
88 void Stop() | 102 void Stop() |
89 { | 103 { |
90 StopInternal(); | 104 StopInternal(); |