Thread counting fix
This commit is contained in:
parent
cebfd84416
commit
7c03cc622c
@ -1343,12 +1343,12 @@ class XMLStream(object):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
def _start_thread(self, name, target, track=True):
|
def _start_thread(self, name, target, track=True):
|
||||||
self.__active_threads.add(name)
|
|
||||||
self.__thread[name] = threading.Thread(name=name, target=target)
|
self.__thread[name] = threading.Thread(name=name, target=target)
|
||||||
self.__thread[name].daemon = self._use_daemons
|
self.__thread[name].daemon = self._use_daemons
|
||||||
self.__thread[name].start()
|
self.__thread[name].start()
|
||||||
|
|
||||||
if track:
|
if track:
|
||||||
|
self.__active_threads.add(name)
|
||||||
with self.__thread_cond:
|
with self.__thread_cond:
|
||||||
self.__thread_count += 1
|
self.__thread_count += 1
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user