summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/gc/Client.cpp
diff options
context:
space:
mode:
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();