c4d_thread.h File Reference

Classes

class  BaseThread
 
class  C4DThread
 
class  AutoLock
 
class  AutoLocker
 
class  AutoRWLock
 
class  AutoRWLocker
 

Functions

Int32 GeGetCurrentThreadCount (void)
 
void GeThreadLock (void)
 
void GeThreadUnlock (void)
 
THREADTYPE IdentifyThread (BaseThread *bt)
 
UInt32 GeGetCurrentThreadId ()
 
BaseThreadGeGetCurrentThread ()
 
BaseThreadGeGetDummyThread ()
 
BaseThreadGeGetEscTestThread ()
 
maxon::ThreadRef MaxonConvert (BaseThread *thread)
 
BaseThreadMaxonConvert (const maxon::ThreadRef &thread)
 
BaseThreadMaxonConvert (const maxon::ThreadInterface *thread)
 

Function Documentation

◆ GeGetCurrentThreadCount()

Int32 GeGetCurrentThreadCount ( void  )

Retrieves the number of threads being used for the current (render) context.

Note
This might be smaller than the actual CPU core or thread count if the user selected a custom number of render threads.
Returns
The number of threads being used for the current context.

◆ GeThreadLock()

void GeThreadLock ( void  )

A global semaphore. When this is locked, any other thread trying to acquire the lock will have to wait. Other threads will continue. Deprecated.

Warning
As this blocks all threads it should only be used if and when necessary, a local semaphore is a more elegant and efficient solution to multiple thread data access.

◆ GeThreadUnlock()

void GeThreadUnlock ( void  )

Continues blocked threads after a call to GeThreadLock(). Deprecated.

◆ IdentifyThread()

THREADTYPE IdentifyThread ( BaseThread bt)

Identifies the type of a thread.

Parameters
[in]btThe thread to identify. The caller owns the pointed thread.
Returns
The thread type: THREADTYPE

◆ GeGetCurrentThreadId()

UInt32 GeGetCurrentThreadId ( )

Retrieves a unique ID for the current thread.

Note
Usually you do not have to care about this.
Returns
The unique ID for the current thread.

◆ GeGetCurrentThread()

BaseThread* GeGetCurrentThread ( )

Retrieves the current thread.

Returns
The current thread.

◆ GeGetDummyThread()

BaseThread* GeGetDummyThread ( )

Returns a dummy thread (TestBreak() will always return false).

Since
R17.032
Returns
A pointer to a dummy thread (guaranteed to be valid).

◆ GeGetEscTestThread()

BaseThread* GeGetEscTestThread ( )

Returns a dummy thread for escape key testing (TestBreak() will return true, when the user presses the Esc key).

Since
R17.032
Returns
A pointer to an escape key test thread (guaranteed to be valid).

◆ MaxonConvert() [1/3]

maxon::ThreadRef MaxonConvert ( BaseThread thread)

◆ MaxonConvert() [2/3]

BaseThread* MaxonConvert ( const maxon::ThreadRef thread)

◆ MaxonConvert() [3/3]

BaseThread* MaxonConvert ( const maxon::ThreadInterface thread)