Index: source/ariba/utility/system/SystemQueue.cpp
===================================================================
--- source/ariba/utility/system/SystemQueue.cpp	(revision 12764)
+++ source/ariba/utility/system/SystemQueue.cpp	(revision 12765)
@@ -76,5 +76,9 @@
 void SystemQueue::scheduleEvent( const SystemEvent& event, uint32_t delay )
 {
-    assert ( SysQ->running );  // should we really enforce this?
+//     assert ( SysQ->running );  // should we really enforce this?
+    if ( ! SysQ->running )
+    {
+        logging_debug("/// WARNING: The SystemQueue is NOT RUNNING!");
+    }
     
     // copy
@@ -140,4 +144,22 @@
     SysQ.reset( new QueueThread() );
 }
+
+
+void SystemQueue::leave()
+{
+    // signal SysQ to quit (and abort queued events)
+    SysQ->cancel();
+}
+
+void SystemQueue::join()
+{
+    if ( sysq_thread )
+    {
+        logging_debug("/// ... joining SysQ thread");
+        sysq_thread->join();
+    }
+}
+
+
 
 void SystemQueue::dropAll( const SystemEventListener* mlistener)
@@ -303,5 +325,5 @@
         if ( timedEventsQ.empty() )
         {
-            logging_debug("/// SysQ is going to sleep.");
+//             logging_debug("/// SysQ is going to sleep.");
             
             this->system_queue_idle.wait( lock );
@@ -310,10 +332,10 @@
         else
         {
-            logging_debug( "/// SysQ is going to sleep for "
-                        << ( timedEventsQ.top().deadline - get_clock() ).total_milliseconds()
-                        << "ms. Deadline: " 
-                        << timedEventsQ.top().deadline
-                        << ", Clock: "
-                        << get_clock() );
+//             logging_debug( "/// SysQ is going to sleep for "
+//                         << ( timedEventsQ.top().deadline - get_clock() ).total_milliseconds()
+//                         << "ms. Deadline: " 
+//                         << timedEventsQ.top().deadline
+//                         << ", Clock: "
+//                         << get_clock() );
 
             this->system_queue_idle.timed_wait( lock, timedEventsQ.top().deadline );
Index: source/ariba/utility/system/SystemQueue.h
===================================================================
--- source/ariba/utility/system/SystemQueue.h	(revision 12764)
+++ source/ariba/utility/system/SystemQueue.h	(revision 12765)
@@ -117,8 +117,32 @@
 	 * Cancels the system queue and ends the processing after the
 	 * currently processed event is processed.
+     * 
+     * NOTE: Do not call this function from within a SystemQueue-Event.
+     *   Use SystemQueue::leave() instead.
 	 *
 	 * This method is thread-safe.
 	 */
 	void cancel();
+    
+    /**
+     * Like SystemQueue::cancel(), but may only be called from within a SystemQueue-Event.
+     * 
+     * NOTE: In this case some cleanup can not be made. -- If the SystemQueue is 
+     *   restarted, SystemQueue::cancel() must be called before SystemQueue::run()
+     *   can be called again.
+     */
+    void leave();
+    
+    /**
+     * Join the SystemQueue thread -- the current thread is blocked until the
+     * SystemQueue finishes.
+     * 
+     * NOTE: Use this only in combination with SystemQueue::leave()
+     * 
+     * [ There is a possible race condition with SystemQueue::cancel(), but 
+     *   SystemQueue::join() should not be used at the same time as 
+     *   SystemQueue::cancel() anyway. (SystemQueue::leave() is fine, though.)
+     */
+    void join();
 
 	/**
