Ignore:
Timestamp:
Mar 14, 2014, 8:26:33 PM (10 years ago)
Author:
hock@…
Message:

new functionality: SystemQueue::leave() and SystemQueue::join()

( + unit tests)

File:
1 edited

Legend:

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

    r12764 r12765  
    117117         * Cancels the system queue and ends the processing after the
    118118         * currently processed event is processed.
     119     *
     120     * NOTE: Do not call this function from within a SystemQueue-Event.
     121     *   Use SystemQueue::leave() instead.
    119122         *
    120123         * This method is thread-safe.
    121124         */
    122125        void cancel();
     126   
     127    /**
     128     * Like SystemQueue::cancel(), but may only be called from within a SystemQueue-Event.
     129     *
     130     * NOTE: In this case some cleanup can not be made. -- If the SystemQueue is
     131     *   restarted, SystemQueue::cancel() must be called before SystemQueue::run()
     132     *   can be called again.
     133     */
     134    void leave();
     135   
     136    /**
     137     * Join the SystemQueue thread -- the current thread is blocked until the
     138     * SystemQueue finishes.
     139     *
     140     * NOTE: Use this only in combination with SystemQueue::leave()
     141     *
     142     * [ There is a possible race condition with SystemQueue::cancel(), but
     143     *   SystemQueue::join() should not be used at the same time as
     144     *   SystemQueue::cancel() anyway. (SystemQueue::leave() is fine, though.)
     145     */
     146    void join();
    123147
    124148        /**
Note: See TracChangeset for help on using the changeset viewer.