MCS  0.3.3-alpha7
All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros Pages
mcs::ThreadFunc Class Reference
+ Inheritance diagram for mcs::ThreadFunc:

Public Member Functions

int retcode ()
 
 ThreadFunc (int(*start_routine)(void *), void *arg)
 Constructor, run a user function in a separate thread. More...
 
 ThreadFunc (Event *(*start_routine)(void *), void *arg)
 
- Public Member Functions inherited from mcs::Thread
Eventerror ()
 Return last error message. More...
 
int id ()
 Returns the Thread object identificator. More...
 
Threadparent ()
 Returns the address of the parent. More...
 
void start ()
 Start a new thread in the joinable state. More...
 
void startDetached (bool selfDelete=false)
 Start a new thread in the detached state. More...
 
int state ()
 Return the state of the thread. More...
 
void stop ()
 Stop thread execution. More...
 
 Thread (int id=0, Thread *parent=NULL)
 Declared to avoid using of default copy constructor. More...
 
virtual ~Thread ()
 Destructor. More...
 

Private Member Functions

void run ()
 

Private Attributes

void * arg
 
int ret
 
int(* start_routine1 )(void *)
 
Event *(* start_routine2 )(void *)
 

Additional Inherited Members

- Protected Member Functions inherited from mcs::Thread
virtual void final ()
 Finalization method. More...
 
virtual void initial ()
 Initialization method. More...
 
virtual void notify (int id, Thread *ref)
 A method called from child threads to notify their termination. More...
 
void set_cancel_state (bool cancel)
 Set cancellation state for current thread. More...
 
void test_cancel ()
 Test if a cancellation request is pending. More...
 
- Protected Attributes inherited from mcs::Thread
Eventlerror
 Last error. More...
 

Detailed Description

Definition at line 2797 of file mcs.hh.

Constructor & Destructor Documentation

◆ ThreadFunc()

mcs::ThreadFunc::ThreadFunc ( int(*)(void *)  start_routine,
void *  arg 
)

Constructor, run a user function in a separate thread.

Definition at line 557 of file Thread.cc.


The documentation for this class was generated from the following files:

mcslogo

MCS (My Customizable Server) ver. 0.3.3-alpha7
Documentation generated on Mon May 28 07:39:41 UTC 2018