Show
Ignore:
Timestamp:
03/08/09 17:48:48 (4 years ago)
Author:
robert
Message:

Fixed thread exit problems

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp

    r9847 r9869  
    3838    { 
    3939        m_exit = true; 
     40#if 0         
     41        while(isRunning()) { OpenThreads::YieldCurrentThread(); } 
     42#else         
    4043        join(); 
     44#endif 
    4145    } 
    4246} 
     
    8690 
    8791 
     92void FFmpegDecoderAudio::close(bool waitForThreadToExit) 
     93{ 
     94    m_exit = true; 
     95     
     96    if (isRunning() && waitForThreadToExit) 
     97    { 
     98        while(isRunning()) { OpenThreads::Thread::YieldCurrentThread(); } 
     99    } 
     100} 
     101 
    88102 
    89103void FFmpegDecoderAudio::run() 
     
    104118    } 
    105119} 
    106  
    107120 
    108121