OCILIB (C and C++ Driver for Oracle)  4.7.5
Open source and cross platform Oracle Driver delivering efficient access to Oracle databases.
Loading...
Searching...
No Matches
ocilib::Thread Class Reference

static class allowing to manipulate threads More...

#include <types.hpp>

Public Types

typedef POCI_THREAD ThreadProc
 Thread callback.
 

Static Public Member Functions

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

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 1167 of file types.hpp.

Member Typedef Documentation

◆ ThreadProc

Thread callback.

Definition at line 1177 of file types.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 28 of file Thread.hpp.

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

◆ Destroy()

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

Destroy a thread.

Parameters
handle- Thread handle

Definition at line 33 of file Thread.hpp.

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

◆ Run()

void ocilib::Thread::Run ( ThreadHandle  handle,
ThreadProc  func,
AnyPointer  arg 
)
inlinestatic

Execute the given routine within the given thread.

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

Definition at line 38 of file Thread.hpp.

References ocilib::core::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 43 of file Thread.hpp.

References ocilib::core::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 48 of file Thread.hpp.

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