#include <thread.h>


Public Member Functions | |
| int | run (void *args) |
| int | wait (void **retval) |
| void * | getRetVal () |
| int | terminate () |
| int | getID () |
| bool | isEquals (Thread *t) |
| std::string | toString () |
| void | setName (std::string name) |
Static Public Member Functions | |
| static bool | compare (Thread &t1, Thread &t2) |
| static bool | init () |
| static Thread & | getCurrent () |
Protected Member Functions | |
| virtual int | pre_start () |
| virtual void * | entry_point ()=0 |
| virtual int | exit_point () |
Protected Attributes | |
| void * | m_args |
| void * | m_ret_args |
| pthread_t | m_thread |
socket_ex.cpp, and threads_ex.cpp.
Definition at line 15 of file thread.h.
| int n2nc::sync::Thread::run | ( | void * | args | ) |
Runs the thread by calling entry_point() routine
Definition at line 21 of file thread.cpp.
Referenced by n2nc::net::SocketEventsHandler::waitForEvents().

| int n2nc::sync::Thread::wait | ( | void ** | retval | ) |
Waits (join) the thread and returns the exit-value
Definition at line 41 of file thread.cpp.
| void * n2nc::sync::Thread::getRetVal | ( | ) |
| int n2nc::sync::Thread::terminate | ( | ) |
| int n2nc::sync::Thread::getID | ( | ) |
the thread ID
| bool n2nc::sync::Thread::isEquals | ( | Thread * | t | ) |
Compares thread t. Same of Thread::compare(this, t2)
| std::string n2nc::sync::Thread::toString | ( | ) |
| int n2nc::sync::Thread::pre_start | ( | ) | [protected, virtual] |
setups thread function
Definition at line 16 of file thread.cpp.
| virtual void* n2nc::sync::Thread::entry_point | ( | ) | [protected, pure virtual] |
must implements thread code
Implemented in n2nc::net::SocketEventsHandler, and ThreadTest.
| int n2nc::sync::Thread::exit_point | ( | ) | [protected, virtual] |
must sets the thread in non-running state, here it should implements clean-up routine
Definition at line 28 of file thread.cpp.
1.5.5