Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

RWThread


RWThread RWRunnable

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

Member Functions

Package

Threading

Header File

#include <rw/thread/RWThread.h>

Description

The RWThread 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 RWThread class provides an interface for threads executing outside of a threaded runnable. It defines the member functions that may only be executed by an external thread. The threads executing inside of a threaded runnable should access the runnable using the RWThreadSelf handle class. Those functions that can be accessed from either inside or outside of a threaded runnable are defined in both handle classes.

You may also convert an RWThreadSelf handle to an RWThread handle by calling the RWThreadSelf::getThread() member, but any attempt to violate the thread access restrictions imposed by the separate interfaces will generally result in an RWTHRIllegalAccess exception.

Public Constructors

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

Public Member Operator

RWThread&
operator=(const RWThread& second)

Public Member Functions

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;
RWThreadSelf
getRWThreadSelf(void) const;
RWSchedulingPolicy
getSchedulingPolicy(void) const;
unsigned
getSuspendCount(void) const;
RWPriority
getSystemScopePriority(void) const;
unsigned long
getTimeSliceQuantum(void) const;
unsigned
resume(void);
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);
void
terminate(void);

CAUTION: this operation kills the associated thread without giving it a chance to release locks, unwind the stack, or recover resources. Use only as a last resort!

Protected Constructors

RWThread(RWThreadImp* threadImpP);

Static Public Member Functions

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

See Also

RWThreadSelf, RWRunnable, RWRunnableHandle, RWThreadFunction, RWTThreadIOUFunction<Return>, RWRunnableServer, RWServerPool, RWThreadAttribute



Previous fileTop of DocumentContentsIndexNext file

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