core: add a facility to execute functions on the main io_service
Change-Id: I38e5f4ad5ed6798a14e0075fb7a14b792f8b2413
refs: #4683
diff --git a/core/global-io.hpp b/core/global-io.hpp
index ab0e17c..0fb2fbe 100644
--- a/core/global-io.hpp
+++ b/core/global-io.hpp
@@ -35,14 +35,25 @@
getGlobalIoService();
void
+setMainIoService(boost::asio::io_service* mainIo);
+
+void
setRibIoService(boost::asio::io_service* ribIo);
+/** \brief run a function on the main io_service instance
+ */
+void
+runOnMainIoService(const std::function<void()>& f);
+
/** \brief run a function on the RIB io_service instance
*/
void
runOnRibIoService(const std::function<void()>& f);
boost::asio::io_service&
+getMainIoService();
+
+boost::asio::io_service&
getRibIoService();
#ifdef WITH_TESTS