14 #ifndef THREADSIMPLEIMPL_H 15 #define THREADSIMPLEIMPL_H 20 #ifdef THREAD_SIMPLE_IMPL 28 class ThreadSimpleManager;
29 class MutexSimpleImpl;
47 class EXPCL_PANDA_PIPELINE ThreadSimpleImpl {
49 ThreadSimpleImpl(
Thread *parent_obj);
52 void setup_main_thread();
53 bool start(ThreadPriority priority,
bool joinable);
57 std::string get_unique_id()
const;
59 static void prepare_for_exit();
61 INLINE
static Thread *get_current_thread();
62 INLINE
bool is_same_system_thread()
const;
64 INLINE
static void bind_thread(
Thread *thread);
65 INLINE
static bool is_threading_supported();
66 static bool is_true_threads();
67 INLINE
static bool is_simple_threads();
68 INLINE
static void sleep(
double seconds);
69 INLINE
static void yield();
70 INLINE
static void consider_yield();
72 void sleep_this(
double seconds);
73 void yield_this(
bool volunteer);
74 INLINE
void consider_yield_this();
76 INLINE
double get_wake_time()
const;
78 INLINE
static void write_status(std::ostream &out);
81 static void st_begin_thread(
void *data);
92 static int _next_unique_id;
97 ThreadPriority _priority;
101 double _priority_weight;
104 unsigned int _run_ticks;
115 ThreadContext *_context;
116 unsigned char *_stack;
122 PyThreadState *_python_state;
123 #endif // HAVE_PYTHON 127 JoiningThreads _joining_threads;
129 ThreadSimpleManager *_manager;
130 static ThreadSimpleImpl *
volatile _st_this;
138 #ifdef HAVE_POSIX_THREADS 139 pthread_t _posix_system_thread_id;
142 DWORD _win32_system_thread_id;
145 friend class ThreadSimpleManager;
154 #endif // THREAD_SIMPLE_IMPL PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is our own Panda specialization on the default STL vector.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A thread; that is, a lightweight process.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.