summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/gc/Client.cpp
diff options
context:
space:
mode:
authorMichi Henning <michi@zeroc.com>2003-10-23 06:22:17 +0000
committerMichi Henning <michi@zeroc.com>2003-10-23 06:22:17 +0000
commit0fdb3361e7525f4f49556d1233d9b84c566ec6fb (patch)
treef128daba58f02bfc2c3a4d975c001eeab2562b43 /cpp/test/Ice/gc/Client.cpp
parentfixes (diff)
downloadice-0fdb3361e7525f4f49556d1233d9b84c566ec6fb.tar.bz2
ice-0fdb3361e7525f4f49556d1233d9b84c566ec6fb.tar.xz
ice-0fdb3361e7525f4f49556d1233d9b84c566ec6fb.zip
- Renamed ObjectBase to GCShared.
- Fixed the problem of the gc test sometimes running for over three minutes. - Fixed race condition in printGCStats if a signal caused communicator shutdown.
Diffstat (limited to 'cpp/test/Ice/gc/Client.cpp')
-rw-r--r--cpp/test/Ice/gc/Client.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/cpp/test/Ice/gc/Client.cpp b/cpp/test/Ice/gc/Client.cpp
index afdbd58c3fc..fb1b42ce038 100644
--- a/cpp/test/Ice/gc/Client.cpp
+++ b/cpp/test/Ice/gc/Client.cpp
@@ -63,6 +63,8 @@ public:
virtual void run()
{
+ ::IceUtil::ThreadControl t = getThreadControl();
+
while(true)
{
{
@@ -73,6 +75,8 @@ public:
}
}
+ t.yield();
+
{
NPtr n = new N;
n->left = n;
@@ -485,11 +489,12 @@ MyApplication::run(int argc, char* argv[])
for(int i = 0; i < 50; ++i)
{
- if(!interrupted())
+ if(interrupted())
{
- garbageThread->randomWait();
- Ice::collectGarbage();
+ return EXIT_SUCCESS;
}
+ garbageThread->randomWait();
+ Ice::collectGarbage();
}
garbageThread->stop();