Version 4.2.0.1, tag libreoffice-4.2.0.1
[LibreOffice.git] / sc / inc / clkernelthread.hxx
blob89ae860318f06ba9ecfcc11f6666f1f109c87ef7
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
10 #include <queue>
12 #include <osl/conditn.hxx>
13 #include <salhelper/thread.hxx>
15 #include "formulacell.hxx"
17 namespace sc {
19 struct CLBuildKernelWorkItem
21 enum { COMPILE, FINISH } meWhatToDo;
22 ScFormulaCellGroupRef mxGroup;
25 class CLBuildKernelThread : public salhelper::Thread
27 public:
28 CLBuildKernelThread();
29 virtual ~CLBuildKernelThread();
31 void finish();
33 void push(CLBuildKernelWorkItem item);
35 protected:
36 virtual void execute();
38 private:
39 osl::Mutex maMutex;
40 osl::Condition maCondition;
41 std::queue<CLBuildKernelWorkItem> maQueue;
42 void produce();
43 void consume();
48 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */