summaryrefslogtreecommitdiff
path: root/tests/Thread_Pool_Test.cpp
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1996-11-18 03:56:19 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1996-11-18 03:56:19 +0000
commit8825d290d8873c6ee96e27dcba1f1c8bf59d2236 (patch)
treef8913a7ba038ec752e3d98e49b18950a374a85a9 /tests/Thread_Pool_Test.cpp
parente1b089abb1df9b1c7a5f6eabf1100b6c21ec1fe8 (diff)
downloadATCD-8825d290d8873c6ee96e27dcba1f1c8bf59d2236.tar.gz
ywhoopie!!
More new stuff, more things will break!! I have no idea about this file. Heck, I am not even Doug!
Diffstat (limited to 'tests/Thread_Pool_Test.cpp')
-rw-r--r--tests/Thread_Pool_Test.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/tests/Thread_Pool_Test.cpp b/tests/Thread_Pool_Test.cpp
index 764871ee15b..437c7d8daea 100644
--- a/tests/Thread_Pool_Test.cpp
+++ b/tests/Thread_Pool_Test.cpp
@@ -1,6 +1,6 @@
-// ============================================================================
// $Id$
+// ============================================================================
//
// = LIBRARY
// tests
@@ -130,7 +130,8 @@ produce (Thread_Pool &thread_pool)
for (int n;;)
{
// Allocate a new message.
- ACE_Message_Block *mb = new ACE_Message_Block (BUFSIZ);
+ ACE_Message_Block *mb;
+ ACE_NEW (mb, ACE_Message_Block (BUFSIZ));
#if defined (manual)
ACE_DEBUG ((LM_DEBUG,
@@ -186,10 +187,13 @@ produce (Thread_Pool &thread_pool)
}
}
+#endif /* ACE_HAS_THREADS */
+
int
main (int argc, char *argv[])
{
ACE_START_TEST ("Thread_Pool_Test.cpp");
+#if defined (ACE_HAS_THREADS)
int n_threads = ACE_MAX_THREADS;
ACE_DEBUG ((LM_DEBUG, "(%t) argc = %d, threads = %d\n",
@@ -208,14 +212,9 @@ main (int argc, char *argv[])
ACE_Service_Config::thr_mgr ()->wait ();
ACE_DEBUG ((LM_DEBUG, "(%t) destroying worker tasks and exiting...\n"));
- ACE_END_TEST;
- return 0;
-}
#else
-int
-main (int, char *[])
-{
ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n"));
+#endif /* ACE_HAS_THREADS */
+ ACE_END_TEST;
return 0;
}
-#endif /* ACE_HAS_THREADS */