summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralex <alex@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-07-16 17:20:44 +0000
committeralex <alex@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-07-16 17:20:44 +0000
commit0c732dca53338342660be3286230edd32ebac35d (patch)
tree616c2e9e01684aba966334b7dadda065bf94ac9c
parentd27a4f0078028089dfe1ea0cba7290880a1bd511 (diff)
downloadATCD-0c732dca53338342660be3286230edd32ebac35d.tar.gz
Cosmetic changes.
-rw-r--r--TAO/tests/AMI/client.cpp24
1 files changed, 21 insertions, 3 deletions
diff --git a/TAO/tests/AMI/client.cpp b/TAO/tests/AMI/client.cpp
index ec583f44ee6..75f324dcf67 100644
--- a/TAO/tests/AMI/client.cpp
+++ b/TAO/tests/AMI/client.cpp
@@ -10,7 +10,7 @@ const char *ior = "file://test.ior";
int nthreads = 5;
int niterations = 5;
int debug = 0;
-
+int number_of_replies = 0;
int
parse_args (int argc, char *argv[])
@@ -91,6 +91,8 @@ public:
result,
out_l));
}
+
+ number_of_replies--;
};
~Handler (void) {};
@@ -156,13 +158,29 @@ main (int argc, char *argv[])
// Main thread collects replies. It needs to collect
// <nthreads*niterations> replies.
- size_t number_of_replies = nthreads * niterations;
+ number_of_replies = nthreads * niterations;
+
+ if (debug)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "(%P|%t) : Entering perform_work loop to receive <%d> replies\n",
+ number_of_replies));
+ }
- while (orb->work_pending () && number_of_replies--)
+ // ORB loop.
+ while (orb->work_pending () && number_of_replies > 0)
{
orb->perform_work ();
}
+ if (debug)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "(%P|%t) : Exited perform_work loop Received <%d> replies\n",
+ (nthreads*niterations) - number_of_replies));
+ }
+
+
client.thr_mgr ()->wait ();
ACE_DEBUG ((LM_DEBUG, "threads finished\n"));