Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

RWThreadId



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

Data Types

Member Functions

Package

Synchronization

Header File

#include <rw/sync/RWThreadId.h> 

Description

An RWThreadId represents the identification given by the underlying thread API to a specific thread of execution. The native thread IDs are used to identify and control these threads in the native thread API, but are not necessarily related to any Threads.h++ objects. You can get an instance of RWThreadId directly from a runnable object using the RWRunnableHandle::threadId() member function, or you can call the global function rwThreadId() to get an RWThreadId associated with the current thread. A thread ID is valid only while the separate thread of execution exists.

The global rwThread() function may be used to determine which Threads.h++ threaded runnable object, if any, that is associated with the current thread of execution. The rwThreadHash() function should be used to retrieve a unique integer value associated with a thread id for output or debugging purposes. You should not attempt to stream an RWThreadId instance directly, as the native thread ID type that this class represents may be a structure and not a simple scalar.

Example

Global Typedefs

typedef DWORD     RWThreadIdRep;   // Win32 with Borland
typedef pthread_t RWThreadIdRep;   // POSIX
typedef thread_t  RWThreadIdRep;   // SOLARIS
typedef TID       RWThreadIdRep;   // OS/2
typedef unsigned  RWThreadIdRep;   // Win32 with Microsoft

Public Constructors

RWThreadId(void);
RWThreadId(const RWThreadIdRep& threadId);

Public Member Operators

RWThreadId&
operator=(const RWThreadId& second);
RWThreadIdRep*
operator&(void) const;
RWBoolean
operator==(const RWThreadId& second) const;
RWBoolean
operator!=(const RWThreadId& second) const;
operator 
RWThreadIdRep&() const;

Public Member Functions

void
clear(vod);
unsigned
hash(void) const;

See Also

rwThreadId, rwThreadHash, rwThread, RWRunnableHandle



Previous fileTop of DocumentContentsIndexNext file

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