Index: trunk/FACT++/src/scheduler.cc
===================================================================
--- trunk/FACT++/src/scheduler.cc	(revision 10709)
+++ trunk/FACT++/src/scheduler.cc	(revision 10710)
@@ -686,4 +686,12 @@
 // ------------------------------------------------------------------------
 
+void RunThread(StateMachineImp *io_service)
+{
+    // This is necessary so that the StateMachien Thread can signal the
+    // Readline to exit
+    io_service->Run();
+    Readline::Stop();
+}
+
 template<class S>
 int RunDim(Configuration &conf)
@@ -725,5 +733,6 @@
     shell.SetReceiver(io_service);
 
-    boost::thread t(boost::bind(&AutoScheduler<S>::Run, &io_service));
+//    boost::thread t(boost::bind(&AutoScheduler<S>::Run, &io_service));
+    boost::thread t(boost::bind(RunThread, &io_service));
 
     //io_service.SetReady();
