gtkIOStream  1.7.0
GTK+ << C++ IOStream operators for GTK+. Now with ORBing, numerical computation, audio client and more ...
ThreadedMethod Class Referenceabstract

#include <Thread.H>

Inheritance diagram for ThreadedMethod:
[legend]
Collaboration diagram for ThreadedMethod:
[legend]

Public Member Functions

virtual void * threadMain (void)=0
 
virtual int run (int priority=0)
 
- Public Member Functions inherited from Thread
 Thread (void)
 
virtual ~Thread (void)
 
void * stop (void)
 
int run (void *(*start_routine)(void *), void *data, int priority=0)
 
int setPriority (pthread_attr_t *attributes, int priority)
 
int getPriority ()
 
void * meetThread (void)
 
void exit (void *retVal)
 
bool running ()
 

Static Private Member Functions

static void * threadMainStatic (void *data)
 

Detailed Description

For the threading of a single method.

Examples:
ThreadTest.C.

Definition at line 239 of file Thread.H.

Member Function Documentation

◆ run()

virtual int ThreadedMethod::run ( int  priority = 0)
inlinevirtual

Start the threadMain in a new thread.

Parameters
prioiritySet the priority for the thread e.g. sched_get_priority_max(SCHED_FIFO)
Returns
NO_ERROR on success, or a suitable error on failure : THREAD_CREATE_ERROR
Examples:
IIOQueueTest.C.

Definition at line 263 of file Thread.H.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ threadMain()

virtual void* ThreadedMethod::threadMain ( void  )
pure virtual

The inheriting class implements the thread's main method.

Returns
A pointer to a return variable (only used if USE_GLIB_THREADS is not defined = pthread )

Implemented in JackPortMonitor, FileWatchThreaded, IIOThreaded, and IIOThreadedQ.

◆ threadMainStatic()

static void* ThreadedMethod::threadMainStatic ( void *  data)
inlinestaticprivate

The static method which is called to begin the thread.

Definition at line 249 of file Thread.H.


The documentation for this class was generated from the following file:
gtkIOStream: ThreadedMethod Class Reference
GTK+ IOStream  Beta