|
Panda3D
|
Classes | |
| class | _local |
| class | error |
| class | LockType |
Functions | |
| _add_thread (thread, wrapper) | |
| _get_thread_locals (thread, i) | |
| _get_thread_wrapper (thread, wrapperClass) | |
| _newname (template="Thread-%d") | |
| _remove_thread_id (threadId) | |
| allocate_lock () | |
| exit () | |
| get_ident () | |
| interrupt_main () | |
| stack_size (size=0) | |
| start_new_thread (function, args, kwargs={}, name=None) | |
Variables | |
| int | _counter = 0 |
| int | _nextThreadId = 0 |
| dict | _threads = {} |
| _threadsLock = core.Mutex('thread._threadsLock') | |
| consider_yield = core.Thread.consider_yield | |
| considerYield = consider_yield | |
| error = RuntimeError | |
| force_yield = core.Thread.force_yield | |
| forceYield = force_yield | |
| TIMEOUT_MAX = float(0xffffffff // 1000) | |
This module reimplements Python's native thread module using Panda threading constructs. It's designed as a drop-in replacement for the thread module for code that works with Panda; it is necessary because in some compilation models, Panda's threading constructs are incompatible with the OS-provided threads used by Python's thread module.
|
protected |
Adds the indicated core.Thread object, with the indicated Python wrapper, to the thread list. Returns the new thread ID.
|
protected |
Returns the locals dictionary for the indicated thread. If there is not one, creates an empty dictionary.
|
protected |
Returns the thread wrapper for the indicated thread. If there is not one, creates an instance of the indicated wrapperClass instead.
|
protected |
|
protected |
Removes the thread with the indicated ID from the thread list.
| allocate_lock | ( | ) |
| exit | ( | ) |
| get_ident | ( | ) |
| interrupt_main | ( | ) |
| stack_size | ( | size = 0 | ) |
| start_new_thread | ( | function, | |
| args, | |||
| kwargs = {}, | |||
| name = None ) |
|
protected |
|
protected |
|
protected |
|
protected |
| consider_yield = core.Thread.consider_yield |
| considerYield = consider_yield |
| error = RuntimeError |
| force_yield = core.Thread.force_yield |
| forceYield = force_yield |
| TIMEOUT_MAX = float(0xffffffff // 1000) |