Panda3D
Loading...
Searching...
No Matches
threadDummyImpl.cxx
Go to the documentation of this file.
1/**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file threadDummyImpl.cxx
10 * @author drose
11 * @date 2002-08-09
12 */
13
14#include "selectThreadImpl.h"
15
16#ifdef THREAD_DUMMY_IMPL
17
18#include "threadDummyImpl.h"
19#include "thread.h"
20
21#ifdef _WIN32
22#ifndef WIN32_LEAN_AND_MEAN
23#define WIN32_LEAN_AND_MEAN 1
24#endif
25#include <windows.h>
26#endif
27
28/**
29 *
30 */
31std::string ThreadDummyImpl::
32get_unique_id() const {
33 // In a single-threaded application, this is just the unique process ID.
34 std::ostringstream strm;
35#ifdef WIN32
36 strm << GetCurrentProcessId();
37#else
38 strm << getpid();
39#endif
40 return strm.str();
41}
42
43/**
44 *
45 */
46Thread *ThreadDummyImpl::
47get_current_thread() {
49}
50
51#endif // THREAD_DUMMY_IMPL
A thread; that is, a lightweight process.
Definition thread.h:46
get_main_thread
Returns a pointer to the "main" Thread object–this is the Thread that started the whole process.
Definition thread.h:107
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.