From 43206527055cb5679c389723a861c2416a231521 Mon Sep 17 00:00:00 2001 From: xiehan <52160700+Barenboim@users.noreply.github.com> Date: Sat, 8 May 2021 18:03:03 +0800 Subject: [PATCH 1/4] Update tutorial-11-graph_task.cc --- tutorial/tutorial-11-graph_task.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/tutorial/tutorial-11-graph_task.cc b/tutorial/tutorial-11-graph_task.cc index aecfcbd8..e031d985 100644 --- a/tutorial/tutorial-11-graph_task.cc +++ b/tutorial/tutorial-11-graph_task.cc @@ -93,5 +93,6 @@ int main(void) graph->start(); wait_group.wait(); + return 0; } From ec9055f90a7f42f289b5bcbb460dd8ee46d0e391 Mon Sep 17 00:00:00 2001 From: xiehan <52160700+Barenboim@users.noreply.github.com> Date: Sat, 8 May 2021 23:30:43 +0800 Subject: [PATCH 2/4] Fix typo. --- tutorial/tutorial-11-graph_task.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorial/tutorial-11-graph_task.cc b/tutorial/tutorial-11-graph_task.cc index e031d985..febdedc8 100644 --- a/tutorial/tutorial-11-graph_task.cc +++ b/tutorial/tutorial-11-graph_task.cc @@ -73,7 +73,7 @@ int main(void) /* go task will print the http pages's size */ go_task = WFTaskFactory::create_go_task("go", go_func, &size1, &size2); - /* Greate a graph. graph is also a kind of task */ + /* Create a graph. Graph is also a kind of task */ WFGraphTask *graph = WFTaskFactory::create_graph_task([](WFGraphTask *) { printf("Graph task complete. Wakeup main process\n"); wait_group.done(); From d5416f778b9de027af5b2403452b7013cc00dba8 Mon Sep 17 00:00:00 2001 From: xiehan <52160700+Barenboim@users.noreply.github.com> Date: Sun, 9 May 2021 01:38:43 +0800 Subject: [PATCH 3/4] Fix typo. --- tutorial/tutorial-11-graph_task.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorial/tutorial-11-graph_task.cc b/tutorial/tutorial-11-graph_task.cc index febdedc8..d552d808 100644 --- a/tutorial/tutorial-11-graph_task.cc +++ b/tutorial/tutorial-11-graph_task.cc @@ -79,7 +79,7 @@ int main(void) wait_group.done(); }); - /* Greate graph nodes */ + /* Create graph nodes */ WFGraphNode& a = graph->create_graph_node(timer); WFGraphNode& b = graph->create_graph_node(http_task1); WFGraphNode& c = graph->create_graph_node(http_task2); From c705910b2fd3c603bc6ceac968383cdd104b5181 Mon Sep 17 00:00:00 2001 From: "junfeng.fj" Date: Sun, 9 May 2021 21:28:36 +0800 Subject: [PATCH 4/4] optimize tutorial-11 --- tutorial/tutorial-11-graph_task.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tutorial/tutorial-11-graph_task.cc b/tutorial/tutorial-11-graph_task.cc index d552d808..2f44e27a 100644 --- a/tutorial/tutorial-11-graph_task.cc +++ b/tutorial/tutorial-11-graph_task.cc @@ -26,7 +26,7 @@ using namespace protocol; static WFFacilities::WaitGroup wait_group(1); -void go_func(size_t *size1, size_t *size2) +void go_func(const size_t *size1, const size_t *size2) { printf("page1 size = %zu, page2 size = %zu\n", *size1, *size2); } @@ -45,7 +45,7 @@ void http_callback(WFHttpTask *task) #define REDIRECT_MAX 3 #define RETRY_MAX 1 -int main(void) +int main() { WFTimerTask *timer; WFHttpTask *http_task1; @@ -70,7 +70,7 @@ int main(void) http_callback); http_task2->user_data = &size2; - /* go task will print the http pages's size */ + /* go task will print the http pages size */ go_task = WFTaskFactory::create_go_task("go", go_func, &size1, &size2); /* Create a graph. Graph is also a kind of task */