summaryrefslogtreecommitdiff
path: root/py/test/Ice/operations/ServerAMD.py
diff options
context:
space:
mode:
Diffstat (limited to 'py/test/Ice/operations/ServerAMD.py')
-rwxr-xr-xpy/test/Ice/operations/ServerAMD.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/py/test/Ice/operations/ServerAMD.py b/py/test/Ice/operations/ServerAMD.py
index b1510246cc3..a7d09dfe07f 100755
--- a/py/test/Ice/operations/ServerAMD.py
+++ b/py/test/Ice/operations/ServerAMD.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# **********************************************************************
#
-# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved.
+# Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
#
# This copy of Ice is licensed to you under the terms described in the
# ICE_LICENSE file included in this distribution.
@@ -30,22 +30,27 @@ class Thread_opVoid(threading.Thread):
class MyDerivedClassI(Test.MyDerivedClass):
def __init__(self):
self.opVoidThread = None
+ self.opVoidThreadLock = threading.Lock()
def shutdown_async(self, cb, current=None):
+ self.opVoidThreadLock.acquire()
if self.opVoidThread:
self.opVoidThread.join()
self.opVoidThread = None
+ self.opVoidThreadLock.release()
current.adapter.getCommunicator().shutdown()
cb.ice_response()
def opVoid_async(self, cb, current=None):
+ self.opVoidThreadLock.acquire()
if self.opVoidThread:
self.opVoidThread.join()
self.opVoidThread = None
self.opVoidThread = Thread_opVoid(cb)
self.opVoidThread.start()
+ self.opVoidThreadLock.release()
def opByte_async(self, cb, p1, p2, current=None):
cb.ice_response(p1, p1 ^ p2)