Scheduler: moved backtrace generation for TaskInfo from FIFORunner::enqueue to TaskIn...
tho [Fri, 10 Sep 2010 09:35:03 +0000 (09:35 +0000)]
git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1712 270642c3-0616-0410-b53a-bc976706d245

senf/Scheduler/FIFORunner.cci

index 89fb2d8..9fdb9e7 100644 (file)
 prefix_ senf::scheduler::detail::FIFORunner::TaskInfo::TaskInfo(std::string const & name,
                                                                 Priority priority)
     : Event(name), runnable_ (false), priority_ (priority)
-{}
+{
+#ifdef SENF_DEBUG
+    std::stringstream ss;
+    backtrace(ss, 32);
+    backtrace_ = ss.str();
+#endif
+}
 
 prefix_ senf::scheduler::detail::FIFORunner::TaskInfo::~TaskInfo()
 {}
@@ -103,11 +109,6 @@ prefix_ std::string senf::scheduler::detail::FIFORunner::NullTask::v_info()
 prefix_ void senf::scheduler::detail::FIFORunner::enqueue(TaskInfo * task)
 {
     tasks_.insert(priorityEnd(task->priority_), *task);
-#ifdef SENF_DEBUG
-    std::stringstream ss;
-    backtrace(ss, 32);
-    task->backtrace_ = ss.str();
-#endif
 }
 
 prefix_ void senf::scheduler::detail::FIFORunner::taskTimeout(unsigned ms)