fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / cppu / source / threadpool / thread.hxx
blob2b7aa966488c176126083b1450fc38912e9adb11
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/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef INCLUDED_CPPU_SOURCE_THREADPOOL_THREAD_HXX
20 #define INCLUDED_CPPU_SOURCE_THREADPOOL_THREAD_HXX
22 #include <osl/thread.hxx>
23 #include <sal/types.h>
24 #include <salhelper/simplereferenceobject.hxx>
26 #include "jobqueue.hxx"
27 #include "threadpool.hxx"
29 namespace cppu_threadpool {
31 class JobQueue;
34 // private thread class for the threadpool
36 class ORequestThread:
37 public salhelper::SimpleReferenceObject, public osl::Thread
39 public:
40 ORequestThread( ThreadPoolHolder const &aThreadPool,
41 JobQueue * ,
42 const ::rtl::ByteSequence &aThreadId,
43 bool bAsynchron );
44 virtual ~ORequestThread();
46 void setTask( JobQueue * , const ::rtl::ByteSequence & aThreadId , bool bAsynchron );
48 bool launch();
50 static inline void * operator new(std::size_t size)
51 { return SimpleReferenceObject::operator new(size); }
53 static inline void operator delete(void * pointer)
54 { SimpleReferenceObject::operator delete(pointer); }
56 private:
57 virtual void SAL_CALL run() SAL_OVERRIDE;
58 virtual void SAL_CALL onTerminated() SAL_OVERRIDE;
60 ThreadPoolHolder m_aThreadPool;
61 JobQueue *m_pQueue;
62 ::rtl::ByteSequence m_aThreadId;
63 bool m_bAsynchron;
66 } // end cppu_threadpool
69 #endif
71 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */