@Override
		public void run() {
			Runnable runnable;
			while (state != MyState.STOP) {
				synchronized (queue) {
					while (queue.isEmpty()) {
						if (state == MyState.START) {
							try {
								queue.wait();
							} catch (InterruptedException e) {
								System.out.println(e);
							}
						}
						if (state == MyState.STOP && queue.isEmpty())
							return;
					}
					runnable = queue.remove();
					queue.notifyAll();
				}
				runnable.run();
			}
		}