Main Thread abort



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 23/08/2007 at 04:19, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   10.1 
    Platform:   Windows  ;   
    Language(s) :     C++  ;

    ---------
    Hi there!

    I have a rather long computation triggered by a Command. I was wondering if it is possible to somehow still get a thread object for the current thread (presumably the main thread) or another way to test for user aborts.

    Timm



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 15/07/2009 at 11:09, xxxxxxxx wrote:

    Just ran into the very same issue again. Any ideas?



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 16/07/2009 at 01:41, xxxxxxxx wrote:

    Is BaseThread* GeGetCurrentThread() what you are looking for?

    cheers,
    Matthias



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 16/07/2009 at 01:50, xxxxxxxx wrote:

    I should've mentioned that this is what I already tried, but that function seems to return NULL when I am in the main thread :-(

    Timm



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 20/08/2009 at 16:02, xxxxxxxx wrote:

    Perhaps this helps:

        
        
        
        
        BaseContainer state;
        
        
        
        
        GetInputState (BFM_INPUT_KEYBOARD, KEY_ESC, state);
        
        
        
        
        if ( state.GetLong (BFM_INPUT_VALUE) != 0 )
        
        
        
        
        {
        
        
        
        
        break; // exit the application here
        
        
        
        
        }
        
        
        
    

    Andre


Log in to reply