From 959012a030c8e427c1f9d06b3ed750258e4d5f8b Mon Sep 17 00:00:00 2001 From: schmidt Date: Sat, 10 Jul 1999 19:33:52 +0000 Subject: ChangeLogTag:Sat Jul 10 13:16:50 1999 Douglas C. Schmidt --- tests/Thread_Pool_Test.cpp | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'tests/Thread_Pool_Test.cpp') 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 , +// Douglas C. Schmidt , and +// Prashant Jain // // ============================================================================ @@ -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 (); -- cgit v1.2.1