-------------------------------------------------------------------------------------- Description: Waits until all messages are printed to stdout. --------------------------------------------------------------------------------------
| 66 | // Waits until all messages are printed to stdout. |
| 67 | // -------------------------------------------------------------------------------------- |
| 68 | void CompileMessageQueue::Flush() |
| 69 | { |
| 70 | while( true ) |
| 71 | { |
| 72 | m_queueEvent.notify_one(); |
| 73 | m_messagesMutex.lock(); |
| 74 | bool empty = m_messages.empty(); |
| 75 | m_messagesMutex.unlock(); |
| 76 | if( empty ) |
| 77 | { |
| 78 | break; |
| 79 | } |
| 80 | std::this_thread::sleep_for( std::chrono::milliseconds( 500 ) ); |
| 81 | } |
| 82 | } |
| 83 | |
| 84 | void CompileMessageQueue::SetEntryFileName( const char* fileName ) |
| 85 | { |