diff options
author | jcej <jcej@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-10-21 18:50:26 +0000 |
---|---|---|
committer | jcej <jcej@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-10-21 18:50:26 +0000 |
commit | 400c526914b854f6be7bebd1561bb618ea49c4d6 (patch) | |
tree | f4954147b5574eaabf23bca998c16c3ebca3efbb /docs/tutorials/007 | |
parent | 0c6dbec8b1c0858449535892c926ed38dc64788c (diff) | |
download | ATCD-400c526914b854f6be7bebd1561bb618ea49c4d6.tar.gz |
*** empty log message ***
Diffstat (limited to 'docs/tutorials/007')
-rw-r--r-- | docs/tutorials/007/Makefile | 1 | ||||
-rw-r--r-- | docs/tutorials/007/client_handler.cpp | 2 | ||||
-rw-r--r-- | docs/tutorials/007/thread_pool.cpp | 4 | ||||
-rw-r--r-- | docs/tutorials/007/thread_pool.h | 11 |
4 files changed, 6 insertions, 12 deletions
diff --git a/docs/tutorials/007/Makefile b/docs/tutorials/007/Makefile index dd68ae58f8a..be02b45ed33 100644 --- a/docs/tutorials/007/Makefile +++ b/docs/tutorials/007/Makefile @@ -52,6 +52,7 @@ include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU include $(ACE_ROOT)/include/makeinclude/macros.GNU include $(ACE_ROOT)/include/makeinclude/rules.common.GNU include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU +include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU include $(ACE_ROOT)/include/makeinclude/rules.local.GNU #---------------------------------------------------------------------------- diff --git a/docs/tutorials/007/client_handler.cpp b/docs/tutorials/007/client_handler.cpp index f91f0ec6c40..39c4395967c 100644 --- a/docs/tutorials/007/client_handler.cpp +++ b/docs/tutorials/007/client_handler.cpp @@ -134,7 +134,7 @@ int Client_Handler::handle_input (ACE_HANDLE _handle) */ if( concurrency() == Client_Acceptor::thread_pool_ ) { - if( ACE_Thread::self() == creator_ ) + if( ACE_OS::thr_equal(ACE_Thread::self(),creator_) ) { /* Remove ourselves from the reactor and ask to be put into the thread pool's diff --git a/docs/tutorials/007/thread_pool.cpp b/docs/tutorials/007/thread_pool.cpp index 0719243df84..852b51ef232 100644 --- a/docs/tutorials/007/thread_pool.cpp +++ b/docs/tutorials/007/thread_pool.cpp @@ -31,8 +31,10 @@ int Thread_Pool::open( int _pool_size ) Closing the thread pool can be a tricky exercise. I've decided to take an easy approach and simply enqueue a secret message for each thread we have active. */ -int Thread_Pool::close( void ) +int Thread_Pool::close( u_long flags ) { + ACE_UNUSED_ARG(flags); + /* Find out how many threads are currently active */ diff --git a/docs/tutorials/007/thread_pool.h b/docs/tutorials/007/thread_pool.h index 0897b1d47af..12b9f14a44f 100644 --- a/docs/tutorials/007/thread_pool.h +++ b/docs/tutorials/007/thread_pool.h @@ -61,18 +61,9 @@ public: virtual int open(void * _void_data) { return inherited::open(_void_data); } - /* - When you're done wit the thread pool, you have to have some way to shut it down. - This is what close() is for. - */ - int close( void ); - /* - Just like open() we have to provide a bogus method that will - invoke the baseclass close() to keep some compilers quiet. */ - virtual int close( u_long flags ) - { return inherited::close(flags); } + int close( u_long flags = 0 ); /* To use the thread pool, you have to put some unit of work into it. Since we're |