summaryrefslogtreecommitdiff
path: root/docs/tutorials/013
diff options
context:
space:
mode:
Diffstat (limited to 'docs/tutorials/013')
-rw-r--r--docs/tutorials/013/block.h13
-rw-r--r--docs/tutorials/013/mld.h11
-rw-r--r--docs/tutorials/013/task.h11
-rw-r--r--docs/tutorials/013/work.h9
4 files changed, 32 insertions, 12 deletions
diff --git a/docs/tutorials/013/block.h b/docs/tutorials/013/block.h
index 40a31bd1b07..26604a57e4c 100644
--- a/docs/tutorials/013/block.h
+++ b/docs/tutorials/013/block.h
@@ -5,6 +5,11 @@
#define BLOCK_H
#include "ace/Message_Block.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
#include "ace/Synch.h"
#include "mld.h"
#include "work.h"
@@ -16,7 +21,7 @@
out of scope unexpectedly. An ACE_Message_Block will be deleted as soon as
it's release() method is called but the ACE_Data_Blocks it uses are
reference counted and only delete when the last reference release()es the
- block. We use that trait to simply our object memory management.
+ block. We use that trait to simply our object memory management.
*/
class Data_Block : public ACE_Data_Block
{
@@ -49,9 +54,9 @@ public:
~Lock (void);
// When the Data_Block is destroyed, the Message_Block is
- // holding a lock with this object. If we were to destroy
+ // holding a lock with this object. If we were to destroy
// the Lock with the Data_Block, we would have a
- // segfault. Instead, the Data_Block invokes destroy() to
+ // segfault. Instead, the Data_Block invokes destroy() to
// mark the object as un-needed so that when the
// Message_Block invokes release() to drop the lock, the
// Lock can delete itself.
@@ -65,7 +70,7 @@ protected:
/*
This simple derivative of ACE_Message_Block will construct our Data_Block
- object to contain a unit of work.
+ object to contain a unit of work.
*/
class Message_Block : public ACE_Message_Block
{
diff --git a/docs/tutorials/013/mld.h b/docs/tutorials/013/mld.h
index a9ee1de02b4..7dbd982e863 100644
--- a/docs/tutorials/013/mld.h
+++ b/docs/tutorials/013/mld.h
@@ -5,13 +5,18 @@
#define MLD_H
#include "ace/Synch.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
#include "ace/Singleton.h"
/*
This is a cheap memory leak detector. Each class I want to watch over
contains an mld object. The mld object's ctor increments a global counter
while the dtor decrements it. If the counter is non-zero when the program
- is ready to exit then there may be a leak.
+ is ready to exit then there may be a leak.
*/
class mld
@@ -30,12 +35,12 @@ protected:
/*
Just drop 'MLD' anywhere in your class definition to get cheap memory leak
- detection for your class.
+ detection for your class.
*/
#define MLD mld mld_
/*
- Use 'MLD_COUNTER' in main() to see if things are OK.
+ Use 'MLD_COUNTER' in main() to see if things are OK.
*/
#define MLD_COUNTER mld::value()
diff --git a/docs/tutorials/013/task.h b/docs/tutorials/013/task.h
index 0c813641169..8c11a8872c6 100644
--- a/docs/tutorials/013/task.h
+++ b/docs/tutorials/013/task.h
@@ -5,15 +5,20 @@
#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
+ 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().
+ fini() method after invoking process().
*/
class Task : public ACE_Task < ACE_MT_SYNCH >
{
diff --git a/docs/tutorials/013/work.h b/docs/tutorials/013/work.h
index 26e10b96266..0cf60afd1ed 100644
--- a/docs/tutorials/013/work.h
+++ b/docs/tutorials/013/work.h
@@ -5,12 +5,17 @@
#define WORK_H
#include "ace/Log_Msg.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
#include "ace/Synch.h"
#include "mld.h"
/*
Our specilized message queue and thread pool will know how to do "work" on
- our Unit_Of_Work baseclass.
+ our Unit_Of_Work baseclass.
*/
class Unit_Of_Work
{
@@ -42,7 +47,7 @@ protected:
/*
A fairly trivial work derivative that implements an equally trivial state
- machine in process()
+ machine in process()
*/
class Work : public Unit_Of_Work
{