while( true )
while( m_continue )
        public void run()         {            while( true )             {                // Wait on EVENT_QUEUE till an event is present                EventObject event = null;                synchronized( EVENT_QUEUE )                 {                    try                     {                        while( EVENT_QUEUE.isEmpty() )                        {                             EVENT_QUEUE.wait();                        }                        Object object = EVENT_QUEUE.remove( 0 );                        try                        {                            event = (EventObject) object;                        }                        catch( ClassCastException cce )                        {                            final String error =                               "Unexpected class cast exception while processing an event."                               + "\nEvent: " + object;                            throw new IllegalStateException( error );                        }                    }                    catch( InterruptedException e )                    {                        return;                    }                }                Object source = event.getSource();                if( source instanceof DefaultModel )                {                    DefaultModel producer = (DefaultModel) source;                    try                    {                        producer.processEvent( event );                    }                    catch( Throwable e )                    {                        final String error =                           "Unexpected error while processing event."                          + "\nEvent: " + event                          + "\nSource: " + this;                        getLogger().error( error );                    }                }                else                {                    final String error =                       "Event source is not an instance of "                       + DefaultModel.class.getName();                    throw new IllegalStateException( error );                }            }        }