Panda3D

- Main Page
- Packages
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions

# PStatThread Class Reference

A lightweight class that represents a single thread of execution to PStats. More...

List of all members.

## Public Member Functions
| PStatThread (PStatThread const copy)
| PStatThread (Thread thread, PStatClient client)
| Creates a new named thread.
| PStatThread (Thread thread)
| Creates a new named thread.
int | getIndex ()
| Returns the index number of this particular thread within the PStatClient.
Thread | getThread ()
| Returns the Panda Thread object associated with this particular PStatThread.
| newFrame ()
| This must be called at the start of every "frame", whatever a frame may be deemed to be, to accumulate all the stats that have collected so far for the thread and ship them off to the server.
PStatThread | operator= (PStatThread const copy)

## Detailed Description

A lightweight class that represents a single thread of execution to PStats.

It corresponds one-to-one with Panda's Thread instance.

## Constructor & Destructor Documentation

PStatThread | ( | PStatThread const | copy | ) |

PStatThread | ( | Thread | thread,
|  | PStatClient | client
| ) |  |

Creates a new named thread.

This will be used to unify tasks that share a common thread, and differentiate tasks that occur in different threads.

PStatThread | ( | Thread | thread | ) |

Creates a new named thread.

This will be used to unify tasks that share a common thread, and differentiate tasks that occur in different threads.

## Member Function Documentation

int getIndex | ( |  | ) |

Returns the index number of this particular thread within the PStatClient.

Thread getThread | ( |  | ) |

Returns the Panda Thread object associated with this particular PStatThread.

newFrame | ( |  | ) |

This must be called at the start of every "frame", whatever a frame may be deemed to be, to accumulate all the stats that have collected so far for the thread and ship them off to the server.

Calling PStatClient.thread_tick() will automatically call this for any threads with the indicated sync name.

PStatThread operator= | ( | PStatThread const | copy | ) |

All Classes Namespaces Functions Variables Enumerations Enumerator Properties