René Schmidt wrote: package com.demo; import ch.qos.logback.classic.Logger; import com.rabbitmq.client.*; public class Demo implements Runnable { private final Logger logger; private final Object lock = new Object(); private volatile boolean run = true; public Demo(Logger logger, String configFile) { this.logger = logger; } @Override public void run() { logger.debug("starting thread"); synchronized(lock) { while(run) { try { lock.wait(); } catch(InterruptedException e) { /* check run again*/ logger.error(e.toString()); } } } } public void stop() { logger.debug("stopping thread"); synchronized(lock) { run = false; lock.notifyAll(); } } }However, when I initialise it and call it from my main thread, stop() never gets called ? Demo demo = new Demo(logger,stuff); demo.run(); demo.stop(); // This never gets called