Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members  

RazorBack::MTmgrdetach_ Class Reference

Class MTmgrdetach_: class for launching detached threads. More...

#include <MTmgr.hh>

Inheritance diagram for RazorBack::MTmgrdetach_:

Inheritance graph
[legend]
Collaboration diagram for RazorBack::MTmgrdetach_:

Collaboration graph
[legend]
List of all members.

Public Methods

 MTmgrdetach_ ()
 ctor.

virtual ~MTmgrdetach_ ()
 dtor.

size_t launch (size_t Threadno, Threadstartfn_ Startfn, void *Arg)
 launch(Threadno, Startfn, Arg): launches Threadno detached threads. More...

void reap ()
 reap(): reaps all threads launched by the calling object. More...

void reap (pthread_t ID)
 reap(ID): performs a cancel operation on thread ID. More...


Private Methods

 MTmgrdetach_ (const MTmgrdetach_ &)
MTmgrdetach_& operator= (const MTmgrdetach_ &)

Private Attributes

pthread_attr_t Attr
 POSIX thread attribute.


Detailed Description

Class MTmgrdetach_: class for launching detached threads.

The MTmgrdetach_ object sends cancel signals to them when reaping and does not wait for them.

Definition at line 184 of file MTmgr.hh.


Constructor & Destructor Documentation

RazorBack::MTmgrdetach_::MTmgrdetach_ ( ) [inline]
 

ctor.

Definition at line 195 of file MTmgr.hh.

RazorBack::MTmgrdetach_::~MTmgrdetach_ ( ) [inline, virtual]
 

dtor.

Definition at line 202 of file MTmgr.hh.

RazorBack::MTmgrdetach_::MTmgrdetach_ ( const MTmgrdetach_ & ) [private]
 


Member Function Documentation

size_t RazorBack::MTmgrdetach_::launch ( size_t Threadno,
Threadstartfn_ Startfn,
void * Arg ) [virtual]
 

launch(Threadno, Startfn, Arg): launches Threadno detached threads.

These start execution in the global C function pointed to by Startfn, with argument Arg. The threads will have default attributes otherwise, in particular cancellation state enabled, cancellation type deferred. Returns the number of threads actually launched.

Reimplemented from RazorBack::MTmgrbase_.

void RazorBack::MTmgrdetach_::reap ( ) [virtual]
 

reap(): reaps all threads launched by the calling object.

This happens by sending a pthread_cancel() request on all thread IDs that are in the internal list of the calling object. The threads will be canceled only if they did not change their original cancellation state! The method returns immediately (no wait on other threads).

Reimplemented from RazorBack::MTmgrbase_.

Referenced by ~MTmgrdetach_().

void RazorBack::MTmgrdetach_::reap ( pthread_t ID ) [virtual]
 

reap(ID): performs a cancel operation on thread ID.

Does nothing if the thread ID is invalid. The threads will be canceled only if they did not change their original cancellation state! The method returns immediately (no wait on other threads).

Reimplemented from RazorBack::MTmgrbase_.

MTmgrdetach_& RazorBack::MTmgrdetach_::operator= ( const MTmgrdetach_ & ) [private]
 


Member Data Documentation

pthread_attr_t RazorBack::MTmgrdetach_::Attr [private]
 

POSIX thread attribute.

Definition at line 189 of file MTmgr.hh.


The documentation for this class was generated from the following file:
Generated at Wed Aug 21 09:33:35 2002 for The Razorback C++ Library: POSIX Thread Wrappers by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001