summaryrefslogtreecommitdiff
path: root/docs/tutorials/007/client_acceptor.cpp
diff options
context:
space:
mode:
authornobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-04-10 19:59:37 +0000
committernobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-04-10 19:59:37 +0000
commit3df4acfa816441fc28a95dee6d0191a927145d95 (patch)
treeb5ae7ca44662cfd8e5c95f1826e4406021a606f5 /docs/tutorials/007/client_acceptor.cpp
parent60a5612b83d856fc0adc52b9f39fac9960ec9818 (diff)
downloadATCD-pre-subset.tar.gz
This commit was manufactured by cvs2svn to create tag 'pre-subset'.pre-subset
Diffstat (limited to 'docs/tutorials/007/client_acceptor.cpp')
-rw-r--r--docs/tutorials/007/client_acceptor.cpp56
1 files changed, 0 insertions, 56 deletions
diff --git a/docs/tutorials/007/client_acceptor.cpp b/docs/tutorials/007/client_acceptor.cpp
deleted file mode 100644
index 9e7e6f7348f..00000000000
--- a/docs/tutorials/007/client_acceptor.cpp
+++ /dev/null
@@ -1,56 +0,0 @@
-// $Id$
-
-#include "client_acceptor.h"
-
-/* Construct ourselves with the chosen concurrency strategy. Notice
- that we also set our Thread_Pool reference to our private instance. */
-Client_Acceptor::Client_Acceptor (int concurrency)
- : concurrency_ (concurrency),
- the_thread_pool_ (private_thread_pool_)
-{
-}
-
-/* Construct ourselves with a reference to somebody else' Thread_Pool.
- Obvioulsy our concurrency strategy is "thread_pool_" at this point. */
-Client_Acceptor::Client_Acceptor (Thread_Pool &thread_pool)
- : concurrency_ (thread_pool_),
- the_thread_pool_ (thread_pool)
-{
-}
-
-/* When we're destructed, we may need to cleanup after ourselves. If
- we're running with a thread pool that we own, it is up to us to
- close it down. */
-Client_Acceptor::~Client_Acceptor (void)
-{
- if (this->concurrency() == thread_pool_ && thread_pool_is_private ())
- thread_pool ()->close ();
-}
-
-/* Similar to the destructor (and close() below) it is necessary for
- us to open the thread pool in some circumstances.
-
- Notice how we delegate most of the open() work to the open() method
- of our baseclass. */
-int
-Client_Acceptor::open (const ACE_INET_Addr &addr,
- ACE_Reactor *reactor,
- int pool_size)
-{
- if (this->concurrency() == thread_pool_ && thread_pool_is_private ())
- thread_pool ()->start (pool_size);
-
- return inherited::open (addr, reactor);
-}
-
-/* Here again we find that we have to manage the thread pool. Like
- open() we also delegate the other work to our baseclass. */
-int
-Client_Acceptor::close (void)
-{
- if (this->concurrency() == thread_pool_ && thread_pool_is_private ())
- thread_pool ()->stop ();
-
- return inherited::close ();
-}
-