summaryrefslogtreecommitdiff
path: root/docs/tutorials/013/task.h
diff options
context:
space:
mode:
authornobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-09-23 19:31:01 +0000
committernobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-09-23 19:31:01 +0000
commit08d2cf8ae623f5aa87ad12ff30ad4ea9e40c8956 (patch)
tree7cadcc4a888a92984e1d9c9f98ae22367e360838 /docs/tutorials/013/task.h
parentcaff940a39e93bc503c3a18ef4daf9aa0a85172b (diff)
downloadATCD-pre_avsvc_split.tar.gz
This commit was manufactured by cvs2svn to create tagpre_avsvc_split
'pre_avsvc_split'.
Diffstat (limited to 'docs/tutorials/013/task.h')
-rw-r--r--docs/tutorials/013/task.h57
1 files changed, 0 insertions, 57 deletions
diff --git a/docs/tutorials/013/task.h b/docs/tutorials/013/task.h
deleted file mode 100644
index c111333b022..00000000000
--- a/docs/tutorials/013/task.h
+++ /dev/null
@@ -1,57 +0,0 @@
-
-// $Id$
-
-#ifndef TASK_H
-#define TASK_H
-
-#include "ace/Task.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "mld.h"
-
-/*
- This is much like the Task we've used in the past for implementing a thread
- pool. This time, however, I've made the Task an element in a singly-linked
- list. As the svc() method finishes the process() on a unit of work, it
- will enqueue that unit of work to the next_ Task if there is one. If the
- Task does not have a next_ Task, it will invoke the unit of work object's
- fini() method after invoking process().
- */
-class Task : public ACE_Task < ACE_MT_SYNCH >
-{
-public:
-
- typedef ACE_Task < ACE_MT_SYNCH > inherited;
-
- // Construct ourselves and an optional number of subtasks
- // chained beyond us.
- Task (int sub_tasks = 0);
- ~Task (void);
-
- /*
- I really wanted this to be called open() but that was already
- claimed by the Task framework. start() will kick off our thread
- pool for us.
- */
- int start (int threads = 1);
-
- // Take Unit_Of_Work objects from the thread pool and invoke
- // their process() and/or fini() as appropriate.
- int svc (void);
-
- // Shut down the thread pool and it's associated subtasks
- int close (u_long flags = 0);
-
- // Wait for the pool and subtasks to close
- int wait (void);
-
-protected:
- ACE_Barrier * barrier_;
- Task *next_;
- MLD;
-};
-
-#endif