summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/ThreadPool.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Ice/ThreadPool.cpp')
-rw-r--r--cpp/src/Ice/ThreadPool.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/cpp/src/Ice/ThreadPool.cpp b/cpp/src/Ice/ThreadPool.cpp
index 87db1874c48..966ea61452b 100644
--- a/cpp/src/Ice/ThreadPool.cpp
+++ b/cpp/src/Ice/ThreadPool.cpp
@@ -34,6 +34,7 @@ void
IceInternal::ThreadPool::_register(SOCKET fd, const EventHandlerPtr& handler)
{
IceUtil::Mutex::Lock sync(*this);
+ assert(!_destroyed);
_changes.push_back(make_pair(fd, handler));
setInterrupt(0);
}
@@ -42,6 +43,7 @@ void
IceInternal::ThreadPool::unregister(SOCKET fd)
{
IceUtil::Mutex::Lock sync(*this);
+ assert(!_destroyed);
_changes.push_back(make_pair(fd, EventHandlerPtr(0)));
setInterrupt(0);
}
@@ -160,6 +162,8 @@ IceInternal::ThreadPool::destroy()
{
IceUtil::Mutex::Lock sync(*this);
assert(!_destroyed);
+ assert(_changes.empty());
+ assert(_handlerMap.empty());
_destroyed = true;
setInterrupt(0);
}