summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1999-07-10 19:33:52 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1999-07-10 19:33:52 +0000
commit72c3d98ae785c4f241c744ccdffb48abe0a239de (patch)
treed9ac9f0b431a77c0f12042bddb5785cc73c096e3 /tests
parent7f1d5072c18c7da58a1ed4c7c343d83e01c5cb5a (diff)
downloadATCD-72c3d98ae785c4f241c744ccdffb48abe0a239de.tar.gz
ChangeLogTag:Sat Jul 10 13:16:50 1999 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu>
Diffstat (limited to 'tests')
-rw-r--r--tests/Thread_Pool_Test.cpp21
1 files changed, 12 insertions, 9 deletions
diff --git a/tests/Thread_Pool_Test.cpp b/tests/Thread_Pool_Test.cpp
index 631d2c05df6..a66f310040a 100644
--- a/tests/Thread_Pool_Test.cpp
+++ b/tests/Thread_Pool_Test.cpp
@@ -18,7 +18,9 @@
// worker tasks compared to queue deactivate.
//
// = AUTHOR
-// Karlheinz Dorn, Doug Schmidt, and Prashant Jain
+// Karlheinz Dorn <Karlheinz.Dorn@med.siemens.de>,
+// Douglas C. Schmidt <schmidt@cs.wustl.edu>, and
+// Prashant Jain <pjain@cs.wustl.edu>
//
// ============================================================================
@@ -153,10 +155,12 @@ Thread_Pool::open (void *)
ASYS_TEXT ("activate failed")),
-1);
- for (size_t count = 0; count < n_iterations; count++)
- {
- ACE_Message_Block *mb;
+ ACE_Message_Block *mb = 0;
+ for (size_t count = 0;
+ count < n_iterations;
+ count++)
+ {
// Allocate a new message.
ACE_NEW_RETURN (mb,
ACE_Message_Block (BUFSIZ,
@@ -192,8 +196,6 @@ Thread_Pool::open (void *)
this->thr_count ()));
this->dump ();
- ACE_Message_Block *mb;
-
ACE_NEW_RETURN (mb,
ACE_Message_Block (0,
ACE_Message_Block::MB_DATA,
@@ -202,9 +204,11 @@ Thread_Pool::open (void *)
0,
&this->lock_adapter_),
-1);
+ int i = 0;
- int i = this->thr_count ();
- while (i > 0)
+ for (i = this->thr_count ();
+ i > 0;
+ i--)
{
ACE_DEBUG ((LM_DEBUG,
ASYS_TEXT ("(%t) EOF, enqueueing NULL block for thread = %d\n"),
@@ -219,7 +223,6 @@ Thread_Pool::open (void *)
ACE_ERROR ((LM_ERROR,
ASYS_TEXT (" (%t) %p\n"),
ASYS_TEXT ("put")));
- i--;
}
mb->release ();