diff example/word_count_test/main.cc @ 670:9eefc1b24c87

add header.
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Thu, 03 Dec 2009 09:02:40 +0900
parents 4af9d20cf3af
children 3b6290c05f9f
line wrap: on
line diff
--- a/example/word_count_test/main.cc	Thu Dec 03 04:47:05 2009 +0900
+++ b/example/word_count_test/main.cc	Thu Dec 03 09:02:40 2009 +0900
@@ -207,17 +207,20 @@
 
     w->t_print = t_print;
 
-    /* Task を task_blocks ずつ起動する Task */
-#ifdef SIMPLE_TASK
-    HTaskPtr t_exec = manager->create_task(RUN_TASK_BLOCKS,
-	(memaddr)&w->self,sizeof(memaddr),0,0);
-#else
-    HTaskPtr t_exec = manager->create_task(RUN_TASK_BLOCKS);
-    t_exec->set_param(0,(void*)w);
-#endif
-    t_exec->spawn();
+    for(int i = 0;i<1;i++) {
+	/* Task を task_blocks ずつ起動する Task */
+        /* serialize されていると仮定する... */
+    #ifdef SIMPLE_TASK
+	HTaskPtr t_exec = manager->create_task(RUN_TASK_BLOCKS,
+	    (memaddr)&w->self,sizeof(memaddr),0,0);
+    #else
+	HTaskPtr t_exec = manager->create_task(RUN_TASK_BLOCKS);
+	t_exec->set_param(0,(void*)w);
+    #endif
+	t_exec->spawn();
+	t_print->wait_for(t_exec);
+    }
 
-    t_print->wait_for(t_exec);
     t_print->spawn();
 }