NVBIO
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Methods | List of all members
nvbio::Thread< DerivedThreadType > Class Template Reference

Detailed description

template< typename DerivedThreadType>
class nvbio::Thread< DerivedThreadType >

A thread class, which is meant to be derived from to construct user-defined threads

Template Parameters
DerivedThreadTypethe derived thread class, which must implement a single method:
// run the user-defined thread
void run();

e.g.

struct MyThread : public Thread<MyThread>
{
void run()
{
// do something
...
}
}

Definition at line 102 of file threads.h.

#include <threads.h>

Inheritance diagram for nvbio::Thread< DerivedThreadType >:
nvbio::ThreadBase

Public Methods

void create ()
 create the thread More...
 
void join ()
 join the thread More...
 
- Public Methods inherited from nvbio::ThreadBase
 ThreadBase ()
 
 ~ThreadBase ()
 
void set_id (const uint32 id)
 
uint32 get_id () const
 
void create (void *(*func)(void *), void *arg)
 create the thread More...
 
void join ()
 join the thread More...
 

Member Function Documentation

template<typename DerivedThreadType>
void nvbio::Thread< DerivedThreadType >::create ( )
inline

create the thread

Definition at line 106 of file threads.h.

template<typename DerivedThreadType>
void nvbio::Thread< DerivedThreadType >::join ( )
inline

join the thread

Definition at line 109 of file threads.h.


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