Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: e32std.h
Link against: euser.lib

Class RUndertaker

class RUndertaker : public RHandleBase;

Description

Handle to a thread death notifier.

The notifier allows threads to be notified of the death of another thread.

The thread-death notifier itself is a kernel object.

Derivation

Members

Defined in RUndertaker:
Create(), Logon(), LogonCancel()

Inherited from RHandleBase:
Attributes(), Close(), Duplicate(), FullName(), Handle(), HandleInfo(), Name(), Open(), SetHandle(), SetHandleNC(), SetReturnedHandle(), iHandle


Member functions


Create()

IMPORT_C TInt Create();

Description

Creates a thread-death notifier, and opens this handle to that thread-death notifier.

Ownership of this thread-death notifier is vested in the current process.

Return value

TInt

KErrNone, if successful; otherwise one of the other system-wide error codes.


Logon()

IMPORT_C TInt Logon(TRequestStatus &aStatus, TInt &aThreadHandle) const;

Description

Issues a request for notification of the death of a thread.

When another thread dies, the request completes and the TRequestStatus object contains the value KErrDied; in addition, aThreadHandle contains the handle-number of the dying thread.

The requesting thread can construct a proper handle for the dying thread using the code:

{
RThread r;
r.SetHandle(aThreadHandle);
...r.Close();
}

Alternatively, if an outstanding request is cancelled by a call to LogonCancel(), then the request completes with the value KErrCancel.

Note that if a request completes normally, i.e. not as a result of a LogonCancel(), then the handle to the dying thread must be closed when there is no further interest in it.

Parameters

TRequestStatus &aStatus

A reference to the request status object.

TInt &aThreadHandle

The handle-number representing the dying thread.

Return value

TInt

KErrInUse if there is an outstanding request; KErrNone otherwise.

See also:


LogonCancel()

IMPORT_C TInt LogonCancel() const;

Description

Cancels an outstanding notification request to the thread-death notifier.

Return value

TInt

KErrGeneral, if there is no outstanding notification request; KErrNone otherwise.

See also: