Mercurial > hg
comparison mercurial/worker.py @ 40443:909c31805f54
py3: roll up threading.Thread constructor args into **kwargs
The constructor doesn't have a `verbose` keyword argument in py3.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Thu, 25 Oct 2018 22:13:22 -0400 |
parents | c08ea1e219c0 |
children | e10adebf8176 |
comparison
equal
deleted
inserted
replaced
40442:d69cf134bd50 | 40443:909c31805f54 |
---|---|
248 elif os.WIFSIGNALED(code): | 248 elif os.WIFSIGNALED(code): |
249 return -os.WTERMSIG(code) | 249 return -os.WTERMSIG(code) |
250 | 250 |
251 def _windowsworker(ui, func, staticargs, args): | 251 def _windowsworker(ui, func, staticargs, args): |
252 class Worker(threading.Thread): | 252 class Worker(threading.Thread): |
253 def __init__(self, taskqueue, resultqueue, func, staticargs, | 253 def __init__(self, taskqueue, resultqueue, func, staticargs, *args, |
254 group=None, target=None, name=None, verbose=None): | 254 **kwargs): |
255 threading.Thread.__init__(self, group=group, target=target, | 255 threading.Thread.__init__(self, *args, **kwargs) |
256 name=name, verbose=verbose) | |
257 self._taskqueue = taskqueue | 256 self._taskqueue = taskqueue |
258 self._resultqueue = resultqueue | 257 self._resultqueue = resultqueue |
259 self._func = func | 258 self._func = func |
260 self._staticargs = staticargs | 259 self._staticargs = staticargs |
261 self._interrupted = False | 260 self._interrupted = False |