Changes between Version 16 and Version 17 of ariba_0_9


Ignore:
Timestamp:
Jun 21, 2013, 3:25:46 PM (11 years ago)
Author:
hock@…
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ariba_0_9

    v16 v17  
    187187
    188188For more information refer to the source code: `ariba/utility/transport/messages/shared_buffer.hpp`
     189
     190
     191=== ''' System Queue ''' ===
     192
     193Instead of implementing `ariba::utility::SystemEventListener` and multiplex different events in the `handleSystemEvent` callback, it's now possible to schedule a function call into the System Queue, using boost::bind.
     194
     195This may look like this:
     196
     197{{{
     198#!cpp
     199void MyClass::some_function()
     200{
     201    string param1 = "hello";
     202    int param2 = 5;
     203
     204    // schedule call of "myfunction(param1, param2)" into System Queue
     205    SystemQueue::instance().scheduleCall(
     206            boost::bind(
     207                    &MyClass::myfunction,
     208                    this,
     209                    param1,
     210                    param2)
     211        );
     212}
     213
     214void MyClass::myfunction(string param1, int param2)
     215{
     216    // do something
     217}
     218}}}
     219
     220Also `SystemQueue::scheduleCall` takes an optional second parameter `uint32_t delay`, to schedule a callback `delay` milli-seconds in the future.