Index: /source/ariba/utility/system/SystemQueue.cpp
===================================================================
--- /source/ariba/utility/system/SystemQueue.cpp	(revision 12770)
+++ /source/ariba/utility/system/SystemQueue.cpp	(revision 12771)
@@ -117,5 +117,6 @@
 {
     // CHECK: this function must not be called from within a SystemQueue-Event
-    if ( sysq_thread && boost::this_thread::get_id() == sysq_thread->get_id() )
+    if ( am_I_in_the_SysQ_thread() )
+//     if ( sysq_thread && boost::this_thread::get_id() == sysq_thread->get_id() )
     {
         logging_warn("SystemQueue::cancel() was called from within a SystemQueue-Event. This is not allowed!");
@@ -179,4 +180,9 @@
 {
     return SysQ->isRunning();
+}
+
+bool SystemQueue::am_I_in_the_SysQ_thread()
+{
+    return sysq_thread && boost::this_thread::get_id() == sysq_thread->get_id();
 }
 
Index: /source/ariba/utility/system/SystemQueue.h
===================================================================
--- /source/ariba/utility/system/SystemQueue.h	(revision 12770)
+++ /source/ariba/utility/system/SystemQueue.h	(revision 12771)
@@ -161,7 +161,15 @@
 	 * Is the system queue already started and running?
 	 *
-	 * @return True, if the system queue is running.
+	 * @return TRUE, if the system queue is running. | FALSE otherwise
 	 */
 	bool isRunning();
+    
+    /**
+     *  NOTE: This function is for debugging and asserts only!!
+     * 
+     *  @return TRUE if called from the SysQ thread (from inside a SystemEvent)
+     *          | FALSE if it's called from another thread
+     */
+    bool am_I_in_the_SysQ_thread();
 
 protected:
Index: /tests/SystemQueue-tests.cc
===================================================================
--- /tests/SystemQueue-tests.cc	(revision 12770)
+++ /tests/SystemQueue-tests.cc	(revision 12771)
@@ -94,4 +94,11 @@
         cout << "### Check ### "<< endl;
 
+        checkmark = true;
+    }
+
+    void CheckThread()
+    {
+        EXPECT_TRUE( SystemQueue::instance().am_I_in_the_SysQ_thread() );
+        
         checkmark = true;
     }
@@ -345,4 +352,27 @@
 }
 
+
+TEST_F(SystemQueueTest, ThreadDetection)
+{
+    SystemQueue& sysq = SystemQueue::instance();
+    
+    // start
+    sysq.run();
+    
+    EXPECT_FALSE( sysq.am_I_in_the_SysQ_thread() );
+    
+    // scheduleCall
+    sysq.scheduleCall(
+        boost::bind(&SystemQueueTest::CheckThread, this)
+    );
+    
+    wait_for_checkmark(MAX_WAIT);
+    
+    sysq.cancel();
+    
+    EXPECT_TRUE( checkmark ) << "WARNING! One of the test functions was not called at all!";
+}
+
+
 /**
  *  schedule multiple calls
