Skip to content

Commit 7da7fa6

Browse files
updated observer
1 parent b5aed9a commit 7da7fa6

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

doxygen/releases/master-branch.dox

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ To download the newest version of Cpp-Taskflow, please clone from <a href="https
2323
@section master-branch_bug_fixes Bug Fixes
2424

2525
@li Fixed the stack overflow problem in zero worker execution
26+
@li Fixed the missing comma in output execution timelines from an executor
2627

2728
There are no major bug fixes for now since @ref release-2-2-0.
2829

taskflow/core/observer.hpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// 2019/07/31 - modified by Tsung-Wei Huang
2+
// - fixed the missing comma in outputing JSON
3+
//
14
// 2019/06/13 - modified by Tsung-Wei Huang
25
// - added TaskView interface
36
//
@@ -46,21 +49,21 @@ class ExecutorObserverInterface {
4649
@brief constructor-like method to call when the executor observer is fully created
4750
@param num_workers the number of the worker threads in the executor
4851
*/
49-
virtual void set_up(unsigned num_workers) {};
52+
virtual void set_up(unsigned num_workers) = 0;
5053

5154
/**
5255
@brief method to call before a worker thread executes a closure
5356
@param worker_id the id of this worker thread
5457
@param task_view a constant wrapper object to the task
5558
*/
56-
virtual void on_entry(unsigned worker_id, TaskView task_view) {};
59+
virtual void on_entry(unsigned worker_id, TaskView task_view) = 0;
5760

5861
/**
5962
@brief method to call after a worker thread executed a closure
6063
@param worker_id the id of this worker thread
6164
@param task_view a constant wrapper object to the task
6265
*/
63-
virtual void on_exit(unsigned worker_id, TaskView task_view) {};
66+
virtual void on_exit(unsigned worker_id, TaskView task_view) = 0;
6467
};
6568

6669
// ------------------------------------------------------------------

0 commit comments

Comments
 (0)