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') s.append('Full Node')
elif isinstance(self.service, LightClient): elif isinstance(self.service, LightClient):
s.append('Light Client') s.append('Light Client')
if conf.processes == -1: if conf.processes in (-1, 99):
s.append('Threads Only') s.append('Threads Only')
elif conf.processes == 0: elif conf.processes == 0:
s.append(f'{os.cpu_count()} Process(es)') s.append(f'{os.cpu_count()} Process(es)')

View file

@ -162,7 +162,7 @@ class Database:
self.message_queue, self.stop_event 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) self.executor = ProcessPoolExecutor(max_workers=self.processes, **kwargs)
else: else:
self.executor = ThreadPoolExecutor(max_workers=1, **kwargs) self.executor = ThreadPoolExecutor(max_workers=1, **kwargs)