added 99 as special number for no processes

This commit is contained in:
Lex Berezhny 2020-07-20 10:46:59 -04:00
parent 96aea579ac
commit c57080711e
2 changed files with 2 additions and 2 deletions

View file

@ -88,7 +88,7 @@ class Basic(Console):
s.append('Full Node')
elif isinstance(self.service, LightClient):
s.append('Light Client')
if conf.processes == -1:
if conf.processes in (-1, 99):
s.append('Threads Only')
elif conf.processes == 0:
s.append(f'{os.cpu_count()} Process(es)')

View file

@ -162,7 +162,7 @@ class Database:
self.message_queue, self.stop_event
)
}
if self.processes > 1:
if self.processes > 1 and self.processes != 99:
self.executor = ProcessPoolExecutor(max_workers=self.processes, **kwargs)
else:
self.executor = ThreadPoolExecutor(max_workers=1, **kwargs)