eric6/DebugClients/Python/ThreadExtension.py

changeset 7986
2971d5d19951
parent 7923
91e843545d9a
child 8043
0acf98cd089a
child 8207
d359172d11be
equal deleted inserted replaced
7985:3a1ca2452c30 7986:2971d5d19951
108 @param blocking flag to indicating a blocking lock 108 @param blocking flag to indicating a blocking lock
109 @type bool 109 @type bool
110 @return flag indicating successful locking 110 @return flag indicating successful locking
111 @rtype bool 111 @rtype bool
112 """ 112 """
113 if blocking: 113 return self.clientLock.acquire(blocking)
114 return self.clientLock.acquire()
115 else:
116 return self.clientLock.acquire(blocking)
117 114
118 def unlockClient(self): 115 def unlockClient(self):
119 """ 116 """
120 Public method to release the lock for this client. 117 Public method to release the lock for this client.
121 """ 118 """
122 try: 119 try:
123 self.clientLock.release() 120 self.clientLock.release()
124 except AssertionError: 121 except RuntimeError:
125 pass 122 pass
126 123
127 def setCurrentThread(self, threadId): 124 def setCurrentThread(self, threadId):
128 """ 125 """
129 Public method to set the current thread. 126 Public method to set the current thread.

eric ide

mercurial