Run ccnx interest and data callback in executor
Run scheduler task in executor
diff --git a/scheduler/task.cc b/scheduler/task.cc
index 0d09199..4702906 100644
--- a/scheduler/task.cc
+++ b/scheduler/task.cc
@@ -26,7 +26,7 @@
eventCallback(evutil_socket_t fd, short what, void *arg)
{
Task *task = static_cast<Task *>(arg);
- task->run();
+ task->execute();
task = NULL;
}
@@ -68,3 +68,9 @@
m_tv->tv_sec = static_cast<int>(intPart);
m_tv->tv_usec = static_cast<int>((fraction * 1000000));
}
+
+void
+Task::execute()
+{
+ m_scheduler->execute(boost::bind(&Task::run, this));
+}