24 #ifndef __DOB_UTILITIES_ASIO_DISPATCHER_H__
25 #define __DOB_UTILITIES_ASIO_DISPATCHER_H__
28 #include <Safir/Dob/Internal/Atomic.h>
29 #include <boost/asio.hpp>
30 #include <boost/bind.hpp>
31 #include <boost/noncopyable.hpp>
43 ,
private boost::noncopyable
53 boost::asio::io_service& ioService)
54 : m_connection(connection)
55 , m_ioService(ioService)
73 virtual void OnDoDispatch()
75 if (m_isNotified == 0)
78 m_ioService.post(boost::bind(&AsioDispatcher::Dispatch,
this));
84 boost::asio::io_service& m_ioService;
85 Safir::Dob::Internal::AtomicUint32 m_isNotified;
92 #endif // __DOB_UTILITIES_ASIO_DISPATCHER_H__
Interface for reception of a dispatch order.
Definition: Consumer.h:72
void Dispatch() const
When the dispatch event or callback is signalled, the application MUST call this method.
The class makes a thread switch and perform a dispatch on Dob connection.
Definition: AsioDispatcher.h:41
A connection to the DOB.
Definition: Connection.h:45
AsioDispatcher(const Safir::Dob::Connection &connection, boost::asio::io_service &ioService)
Constructor.
Definition: AsioDispatcher.h:52