OCILIB (C and C++ Driver for Oracle)  4.6.3
ocilib::Thread Class Reference

static class allowing to manipulate threads More...

#include <ocilib.hpp>

Public Types

typedef POCI_THREAD ThreadProc
 Thread callback.
 

Static Public Member Functions

static ThreadHandle Create ()
 Create a Thread. More...
 
static void Destroy (ThreadHandle handle)
 Destroy a thread. More...
 
static void Run (ThreadHandle handle, ThreadProc func, void *args)
 Execute the given routine within the given thread. More...
 
static void Join (ThreadHandle handle)
 Join the given thread. More...
 
static ThreadId GetThreadId (ThreadHandle handle)
 Return the system Thread ID of the given thread handle. More...
 

Detailed Description

static class allowing to manipulate threads

This class wraps the OCILIB object handle OCI_Thread and its related methods

Note
See Threads and mutexes for more details on Oracle multi-threading support

Definition at line 1333 of file ocilib.hpp.

Member Function Documentation

◆ Create()

ThreadHandle ocilib::Thread::Create ( )
inlinestatic

Create a Thread.

Returns
Thread handle on success or NULL on failure

Definition at line 1333 of file ocilib_impl.hpp.

References ocilib::Check(), and OCI_ThreadCreate().

◆ Destroy()

void ocilib::Thread::Destroy ( ThreadHandle  handle)
inlinestatic

Destroy a thread.

Parameters
handle- Thread handle

Definition at line 1338 of file ocilib_impl.hpp.

References ocilib::Check(), and OCI_ThreadFree().

◆ Run()

void ocilib::Thread::Run ( ThreadHandle  handle,
ThreadProc  func,
void *  args 
)
inlinestatic

Execute the given routine within the given thread.

Parameters
handle- Thread handle
func- routine to execute
args- parameter to pass to the routine

Definition at line 1343 of file ocilib_impl.hpp.

References ocilib::Check(), and OCI_ThreadRun().

◆ Join()

void ocilib::Thread::Join ( ThreadHandle  handle)
inlinestatic

Join the given thread.

Parameters
handle- Thread handle
Note
This function waits for the given thread to finish

Definition at line 1348 of file ocilib_impl.hpp.

References ocilib::Check(), and OCI_ThreadJoin().

◆ GetThreadId()

ThreadId ocilib::Thread::GetThreadId ( ThreadHandle  handle)
inlinestatic

Return the system Thread ID of the given thread handle.

Parameters
handle- Thread handle

Definition at line 1353 of file ocilib_impl.hpp.

References ocilib::Check(), and OCI_HandleGetThreadID().