c4d.threading.BaseThread

class c4d.threading.BaseThread

This is the main thread base class used internally by Cinema 4D.

Warning

This type cannot be instantiated.

Methods Signatures

BaseThread.TestBreak(self)

Check if the thread received a break command to stop processing.

BaseThread.End(self[, wait])

End the thread. This function will not return before the thread has completely stopped.

BaseThread.IsRunning(self)

Check if the thread is running.

Methods Documentation

BaseThread.TestBreak(self)

Check if the thread received a break command to stop processing.

Return type

bool

Returns

True when Cinema 4D closes, or when a stopping condition has occurred, such as End().

BaseThread.End(self, wait=True)

End the thread. This function will not return before the thread has completely stopped.

Note

If the thread does not check for TestBreak() then this function will not return and you will get a deadlock.

Parameters

wait (bool) – This parameter determines if thread termination is synchronous or asynchronous. If True the function will not return until the thread is finished. If False the function returns immediately although the thread will still run until it is finished.

BaseThread.IsRunning(self)

Check if the thread is running.

Return type

bool

Returns

True if the thread is running, otherwise False.