3 /*-------------------------------------------------------------------------
4 * drawElements C++ Base Library
5 * -----------------------------
7 * Copyright 2014 The Android Open Source Project
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
23 * \brief Thread base class.
24 *//*--------------------------------------------------------------------*/
32 /*--------------------------------------------------------------------*//*!
33 * \brief Base class for threads
35 * Thread provides base class for implementing threads. To leverage that
36 * functionality, inherit Thread in your class and implement virtual run()
39 * \note Thread class is not thread-safe, i.e. thread control functions
40 * such as start() or join() can not be called from multiple threads
42 *//*--------------------------------------------------------------------*/
47 virtual ~Thread (void);
49 void setPriority (deThreadPriority priority);
53 bool isStarted (void) const;
55 /** Thread entry point. */
56 virtual void run (void) = DE_NULL;
59 Thread (const Thread& other); // Not allowed!
60 Thread& operator= (const Thread& other); // Not allowed!
62 deThreadAttributes m_attribs;
66 /*--------------------------------------------------------------------*//*!
67 * \brief Get thread launch status.
68 * \return true if thread has been started and no join() has been called,
70 *//*--------------------------------------------------------------------*/
71 inline bool Thread::isStarted (void) const
78 #endif // _DETHREAD_HPP