core/src/java/com/strategicgains/eventing/local/EventMonitor.java
@Override
	public void run()
	{
		System.out.println("Event monitor starting...");

		while(!shouldShutDown)
		{
			try
			{
				synchronized (eventQueue)
				{
					if (eventQueue.isEmpty())
					{
						eventQueue.wait(delay);		// Support wake-up via eventQueue.notify()
					}
				}
			}
			catch (InterruptedException e)
			{
				e.printStackTrace();
				System.err.println("Interrupted (use shutdown() to terminate).  Continuing...");
				continue;
			}

			Object event = null;

			while ((event = eventQueue.poll()) != null)
			{
				processEvent(event);
			}
		}
		
		System.out.println("Event monitor exiting...");
		clearAllHandlers();
	}
@Override
	public void run()
	{
		System.out.println("Event monitor starting...");

		while(!shouldShutDown)
		{
			try
			{
				synchronized (eventQueue)
				{
					if (eventQueue.isEmpty())
					{
						eventQueue.wait(delay);		// Support wake-up via eventQueue.notify()
					}
				}
			}
			catch (InterruptedException e)
			{
				e.printStackTrace();
				System.err.println("Interrupted (use shutdown() to terminate).  Continuing...");
				continue;
			}

			Object event = null;

			while ((event = eventQueue.poll()) != null)
			{
				processEvent(event);
			}
		}
		
		System.out.println("Event monitor exiting...");
		clearAllHandlers();
	}
@ Override public void run ( ) { System . out . println ( "Event monitor starting..." ) ; while ( ! shouldShutDown ) { try { synchronized ( eventQueue ) { if ( eventQueue . isEmpty ( ) ) { eventQueue . wait ( delay ) ; // Support wake-up via eventQueue.notify() } } } catch ( InterruptedException e ) { e . printStackTrace ( ) ; System . err . println ( "Interrupted (use shutdown() to terminate).  Continuing..." ) ; continue ; } Object event = null ; while ( ( event = eventQueue . poll ( ) ) != null ) { processEvent ( event ) ; } } System . out . println ( "Event monitor exiting..." ) ; clearAllHandlers ( ) ; }
SECTION: RUNNABLE/THREAD
SECTION : RUNNABLE / THREAD