Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

RWThreadSelf


RWThreadSelf RWRunnableSelf

Data Type and Member Function Indexes
(exclusive of constructors and destructors)

Member Functions

Package

Threading

Header File

#include <rw/thread/RWThreadSelf.h>          // for RWThreadSelf
#include <rw/thread/RWRunnableSelf.h>        // for ::rwThread()

Description

The RWThreadSelf class is a handle class for a threaded runnable object.

A threaded runnable object provides the basic mechanisms used to create, control, and monitor the threads of execution within your application. Threaded runnables create their own thread to perform some task or activity.

Each threaded runnable object is reference-counted; a threaded runnable body instance keeps a count of the number of handles that currently reference it. A runnable object is deleted when the last handle that references the body is deleted.

The public interface for a threaded runnable is provided by its handle classes. Many of the public functions in a handle simply forward control to a corresponding protected function in the body class. A threaded runnable handle class instance may be empty. Any attempt to use an empty handle to access a threaded runnable will produce an RWTHRInvalidPointer exception.

The RWThreadSelf class provides an interface for the thread executing inside of a threaded runnable. It defines the member functions that may only be executed by the internal thread. Threads executing outside of a threaded runnable should access the runnable using the RWThread handle class. Those functions that may be accessed from either inside or outside of a threaded runnable are defined in both handle classes.

To retrieve an RWThreadSelf handle instance for the current threaded runnable, use the rwThread() function. You may also convert an RWThread handle to an RWThreadSelf handle by calling the RWThread::getThreadSelf() member, but any attempt to violate the thread access restrictions imposed by the separate interfaces will generally result in an RWTHRIllegalAccess exception.

Public Constructors

RWThreadSelf(void);
RWThreadSelf(RWStaticCtor);
RWThreadSelf(const RWThreadSelf& second);

Public Member Operator

RWThreadSelf&
operator=(const RWThreadSelf& second)

Public Member Function

RWBoolean
canGetPriority(void) const;
RWBoolean
canGetProcessScopePriority(void) const;
RWBoolean
canGetSchedulingPolicy(void) const;
RWBoolean
canGetSystemScopePriority(void) const;
RWBoolean
canGetTimeSliceQuantum(void) const;
RWBoolean
canSetPriority(void) const;
RWBoolean
canSetProcessScopePriority(void) const;
RWBoolean
canSetSchedulingPolicy(RWSchedulingPolicy policy) const;
RWBoolean
canSetSystemScopePriority(void) const;
RWBoolean
canSetTimeSliceQuantum(void) const;
RWThreadAttribute
getActiveAttribute(void) const;
RWThreadAttribute
getAttribute(void) const;
RWPriority
getMaxPriority(void) const;
RWPriority
getMaxProcessScopePriority(void) const;
RWPriority
getMaxSystemScopePriority(void) const;
unsigned long
getMaxTimeSliceQuantum(void) const;
RWPriority
getMinPriority(void) const;
RWPriority
getMinProcessScopePriority(void) const;
RWPriority
getMinSystemScopePriority(void) const;
unsigned long
getMinTimeSliceQuantum(void) const;
RWPriority
getPriority(void) const;
RWPriority
getProcessScopePriority(void) const;
RWThread
getRWThread(void) const;
RWSchedulingPolicy
getSchedulingPolicy(void) const;
RWPriority
getSystemScopePriority(void) const;
unsigned long
getTimeSliceQuantum(void) const;
void
setAttribute(const RWThreadAttribute& second);
void
setPriority(RWPriority priority);
void
setProcessScopePriority(RWPriority priority);
void
setSchedulingPolicy(RWSchedulingPolicy policy);
void
setSystemScopePriority(RWPriority priority);
void
setTimeSliceQuantum(unsigned long milliseconds);
unsigned
suspend(void);

Protected Constructors

RWThreadSelf(RWThreadImp* threadImpP);

Static Public Member Functions

RWBoolean
canGetMaxThreads(void);
RWBoolean
canSuspendResume(void);
size_t
getMaxThreads(void);

See Also

RWThread, RWRunnableSelf, RWRunnableHandle, RWThreadAttribute



Previous fileTop of DocumentContentsIndexNext file

©Copyright 2000, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.