diff options
Diffstat (limited to 'ACE/ace')
-rw-r--r-- | ACE/ace/Handle_Gobbler.h | 9 | ||||
-rw-r--r-- | ACE/ace/Handle_Gobbler.inl | 39 |
2 files changed, 2 insertions, 46 deletions
diff --git a/ACE/ace/Handle_Gobbler.h b/ACE/ace/Handle_Gobbler.h index c12ee5d9e93..8d1fb52b580 100644 --- a/ACE/ace/Handle_Gobbler.h +++ b/ACE/ace/Handle_Gobbler.h @@ -16,11 +16,7 @@ #define ACE_HANDLE_GOBBLER_H #include /**/ "ace/pre.h" -#if 0 -#include "ace/Unbounded_Set.h" -#else #include "ace/Handle_Set.h" -#endif #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once @@ -58,11 +54,8 @@ public: inline void close_remaining_handles (void); private: -#if 0 - typedef ACE_Unbounded_Set<ACE_HANDLE> HANDLE_SET; -#else typedef ACE_Handle_Set HANDLE_SET; -#endif + /// The container which holds the open descriptors. HANDLE_SET handle_set_; }; diff --git a/ACE/ace/Handle_Gobbler.inl b/ACE/ace/Handle_Gobbler.inl index 71712082781..e44035a7aed 100644 --- a/ACE/ace/Handle_Gobbler.inl +++ b/ACE/ace/Handle_Gobbler.inl @@ -14,24 +14,9 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL inline void ACE_Handle_Gobbler::close_remaining_handles (void) { -#if 0 - HANDLE_SET::iterator iterator = - this->handle_set_.begin (); - - HANDLE_SET::iterator end = - this->handle_set_.end (); - - for (; - iterator != end; - ++iterator) - { - ACE_OS::close (*iterator); - } -#else ACE_Handle_Set_Iterator iter (this->handle_set_); for (ACE_HANDLE h = iter (); h != ACE_INVALID_HANDLE; h = iter ()) ACE_OS::close (h); -#endif } inline @@ -43,28 +28,12 @@ ACE_Handle_Gobbler::~ACE_Handle_Gobbler (void) inline int ACE_Handle_Gobbler::free_handles (size_t n_handles) { -#if 0 - HANDLE_SET::iterator iterator = - this->handle_set_.begin (); - - HANDLE_SET::iterator end = - this->handle_set_.end (); - - for (; - iterator != end && n_handles > 0; - ++iterator, --n_handles) - { - int result = ACE_OS::close (*iterator); - if (result != 0) - return result; - } -#else ACE_Handle_Set_Iterator iter (this->handle_set_); for (ACE_HANDLE h = iter (); h != ACE_INVALID_HANDLE && n_handles > 0; --n_handles, h = iter ()) ACE_OS::close (h); -#endif + return 0; } @@ -96,15 +65,9 @@ ACE_Handle_Gobbler::consume_handles (size_t n_handles_to_keep_available) break; } } -#if 0 - result = this->handle_set_.insert (handle); - if (result == -1) - break; -#else if (handle >= FD_SETSIZE) break; this->handle_set_.set_bit (handle); -#endif } #endif /* ACE_WIN32 */ |