mirror of
https://gitlab.com/ita1024/waf.git
synced 2024-11-22 01:46:15 +01:00
Handle deprecated Thread.setDaemon in Python 3.10
This commit is contained in:
parent
747a339b7f
commit
55d57d0b58
@ -68,7 +68,7 @@ class Consumer(Utils.threading.Thread):
|
||||
"""Task to execute"""
|
||||
self.spawner = spawner
|
||||
"""Coordinator object"""
|
||||
self.setDaemon(1)
|
||||
self.daemon = True
|
||||
self.start()
|
||||
def run(self):
|
||||
"""
|
||||
@ -95,7 +95,7 @@ class Spawner(Utils.threading.Thread):
|
||||
""":py:class:`waflib.Runner.Parallel` producer instance"""
|
||||
self.sem = Utils.threading.Semaphore(master.numjobs)
|
||||
"""Bounded semaphore that prevents spawning more than *n* concurrent consumers"""
|
||||
self.setDaemon(1)
|
||||
self.daemon = True
|
||||
self.start()
|
||||
def run(self):
|
||||
"""
|
||||
|
@ -56,7 +56,7 @@ def r1(code):
|
||||
@subst('Runner.py')
|
||||
def r4(code):
|
||||
"generator syntax"
|
||||
return code.replace('next(self.biter)', 'self.biter.next()')
|
||||
return code.replace('next(self.biter)', 'self.biter.next()').replace('self.daemon = True', 'self.setDaemon(1)')
|
||||
|
||||
@subst('Context.py')
|
||||
def r5(code):
|
||||
|
Loading…
Reference in New Issue
Block a user