Changeset 12771 for source/ariba/utility


Ignore:
Timestamp:
Mar 19, 2014, 6:41:45 PM (11 years ago)
Author:
hock@…
Message:

added new interface: SystemQueue::am_I_in_the_SysQ_thread

for debugging and asserts..

Location:
source/ariba/utility/system
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • source/ariba/utility/system/SystemQueue.cpp

    r12767 r12771  
    117117{
    118118    // CHECK: this function must not be called from within a SystemQueue-Event
    119     if ( sysq_thread && boost::this_thread::get_id() == sysq_thread->get_id() )
     119    if ( am_I_in_the_SysQ_thread() )
     120//     if ( sysq_thread && boost::this_thread::get_id() == sysq_thread->get_id() )
    120121    {
    121122        logging_warn("SystemQueue::cancel() was called from within a SystemQueue-Event. This is not allowed!");
     
    179180{
    180181    return SysQ->isRunning();
     182}
     183
     184bool SystemQueue::am_I_in_the_SysQ_thread()
     185{
     186    return sysq_thread && boost::this_thread::get_id() == sysq_thread->get_id();
    181187}
    182188
  • source/ariba/utility/system/SystemQueue.h

    r12765 r12771  
    161161         * Is the system queue already started and running?
    162162         *
    163          * @return True, if the system queue is running.
     163         * @return TRUE, if the system queue is running. | FALSE otherwise
    164164         */
    165165        bool isRunning();
     166   
     167    /**
     168     *  NOTE: This function is for debugging and asserts only!!
     169     *
     170     *  @return TRUE if called from the SysQ thread (from inside a SystemEvent)
     171     *          | FALSE if it's called from another thread
     172     */
     173    bool am_I_in_the_SysQ_thread();
    166174
    167175protected:
Note: See TracChangeset for help on using the changeset viewer.