Skip Headers

Oracle Call Interface Programmer's Guide
Release 2 (9.2)

Part Number A96584-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

More OCI Relational Functions, 65 of 106


OCIThreadCreate()

Purpose

Creates a new thread.

Syntax

sword OCIThreadCreate ( dvoid            *hndl, 
                        OCIError         *err, 
                        void (*start)    (dvoid
                        dvoid            *arg, 
                        OCIThreadId      *tid, 
                        OCIThreadHandle  *tHnd );

Parameters

hndl (IN/OUT)

The OCI environment or user session handle.

err (IN/OUT)

The OCI error handle. If there is an error, it is recorded in err and this function returns OCI_ERROR. Diagnostic information can be obtained by calling OCIErrorGet().

start (IN)

The function in which the new thread should begin execution.

arg (IN)

The argument to give the function pointed to by start.

tid (IN/OUT)

If not NULL, gets the ID for the new thread.

tHnd (IN/OUT)

If not NULL, gets the handle for the new thread.

Comments

The new thread starts by executing a call to the function pointed to by start with the argument given by arg. When that function returns, the new thread will terminate. The function should not return a value and should accept one parameter, a dvoid. The call to OCIThreadCreate() must be matched by a call to OCIThreadClose() if and only if tHnd is non-NULL.

If tHnd is NULL, a thread ID placed in *tid will not be valid in the calling thread because the timing of the spawned threads termination is unknown.

tid should be initialized by OCIThreadIdInit() and tHnd should be initialized by OCIThreadHndInit().

Related Functions

OCIThreadClose(), OCIThreadIdInit(), OCIThreadHndInit()


Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback