package Controller; import java.util.concurrent.ConcurrentLinkedQueue; import Model.ModelData; import Model.MyModel; import View.MyView; public class Main { public static void main(String[] args) { ConcurrentLinkedQueue qCommands = new ConcurrentLinkedQueue(); ConcurrentLinkedQueue qDataFromModel = new ConcurrentLinkedQueue(); Object oThreadLock = new Object(); MyModel oModel = new MyModel(oThreadLock, qDataFromModel); ModelData oModelData = new ModelData(""); MyView oView = new MyView(oModelData); oModel.start(); while (true) { //Wake up model thread if new task to execute. synchronized(oThreadLock) { oThreadLock.notifyAll(); } } } }