Example #1
0
void SpinStatus::InfoUpdated( const StatusMonitor& monitor ) const
{
   if ( m_thread != 0 )
   {
      m_console.WriteLn( "<end>*" );
      m_console.Write( "<end><cbr>" + monitor.Info() + ": " );
   }
   else
   {
      if ( !m_console.AbortRequested() )
         m_console.Write( "<end><bol><clreol>" + monitor.Info() + ": " + cspin[m_spinCount%4] );
   }
}
Example #2
0
int SpinStatus::Initialized( const StatusMonitor& monitor ) const
{
   m_thread = (*API->Thread->GetCurrentThread)();
   if ( m_thread != 0 )
   {
      if ( ThreadAborted( m_thread ) )
         return 1;

      m_console.Write( "<end><cbr>" + monitor.Info() + ": " );
   }
   else
   {
      if ( m_console.AbortRequested() )
      {
         m_console.Abort();
         return 1;
      }

      m_console.Write( "<end><cbr>" + monitor.Info() + ": " + cspin[0] );
      m_spinCount = 0;
   }

   return 0;
}