86 return _processingWasSingleThreaded;
92 _allowLateMultiThreadingStart =
flag;
96 struct WorkerThreadState;
102 void processNextWorkerRequest(WorkerThreadState* state, PerThreadStorage&
perThreadStorage);
114 void runPageRequestProducerLoop();
117 void addNewCursors();
120 void runWorkerThreadLoop(WorkerThreadState* state);
123 void notifyAllThreads();
126 void launchWorkerThreads();
129 int getCurrentNumberOfPageRequestsInQueues();
132 void wakeupProducerIfWaitingForQueue();
138 void stopProcessingOnAllThreads();
141 void moveRequestsFromGUIQueuesToOtherQueues();
147 void startCreatingWorkSingleThreaded();
153 bool _producerWorking;
155 int _workerThreadsWorking;
158 int _maxPageRequestsInQueues;
161 bool _producerWaitingForQueue;
164 bool _processingAllowed;
166 bool _useMultiThreading;
167 bool _processingWasSingleThreaded;
168 bool _allowLateMultiThreadingStart;
183 std::vector<PageRequestCursor*> _newCursors;
186 std::deque<PageRequest*> _parallelWorkQueue;
187 std::deque<PageRequest*> _ioWorkQueue;
190 struct WorkerThreadState
193 ~WorkerThreadState();
196 boost::thread* _thread;
208 std::deque<PageRequest*>* _queue;
218 std::size_t _numDesiredWorkerThreads;
221 std::vector<WorkerThreadState*> _workerThreads;
224 WorkerThreadState* _ioThread;
227 boost::thread* _producerThread;
230 ProcessingTimeLine::TimeLine* _producerThreadTimeLine;
249 std::map<PagedImage*, ProfilingInfo> _profilingData;
252 void addThreadTimesToMLProfiling();