Prevent negative --threads sizes, disable changing of tpool size for 1-thread as well as 0-threads
Change-Id: I06e8656b9b0e7f248711c701685b52b0458a5846
This commit is contained in:
parent
03f52026bf
commit
1cc76a1be2
|
@ -132,7 +132,8 @@ class Controller(object):
|
|||
command.append('--reload')
|
||||
env = environ()
|
||||
tpool_size = int(self.config.get('threadpool_workers', 0))
|
||||
if not tpool_size == 0:
|
||||
assert tpool_size >= 0, (tpool_size, 'Cannot have a negative --threads argument')
|
||||
if not tpool_size in (0, 1):
|
||||
env['EVENTLET_THREADPOOL_SIZE'] = str(tpool_size)
|
||||
os.execve(sys.executable, command, env)
|
||||
os.close(child_side)
|
||||
|
|
Loading…
Reference in New Issue