Open Search
    BaseThread Class Reference

    #include <c4d_thread.h>

    Detailed Description

    Main thread base class used internally by Cinema 4D. Deprecated. Use maxon::ThreadInterface/JobInterface etc.

    Note
    Cannot be instantiated.

    Public Member Functions

    Bool TestBreak ()
     
    void End (Bool wait=true)
     
    Bool IsRunning ()
     

    Private Member Functions

     BaseThread ()
     
     ~BaseThread ()
     

    Constructor & Destructor Documentation

    ◆ BaseThread()

    BaseThread ( )
    private

    ◆ ~BaseThread()

    ~BaseThread ( )
    private

    Member Function Documentation

    ◆ TestBreak()

    Bool TestBreak ( )

    Checks if the thread received a break command to stop processing.
    Normally this is only true when Cinema 4D is closing, or when End() has been called.

    Returns
    true processing should be terminated, otherwise false.

    ◆ End()

    void End ( Bool  wait = true)

    Ends the thread. This function will not return until the thread has completely stopped.

    Warning
    If the thread does not check for TestBreak() then this function will not return until the thread has finished and this might get into a deadlock situation.
    Parameters
    [in]waitDetermines 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.

    ◆ IsRunning()

    Bool IsRunning ( )

    Checks if the thread is running.

    Returns
    true if the thread is running, otherwise false.