nogil: remove -j (multiprocessing option)

in case cpython's free-threading / nogil performance proves to
be good enough that the multiprocessing option can be removed,
this is roughly how you'd do it  (not everything's been tested)

but while you'd expect this change to improve performance,
it somehow doesn't, not even measurably so

as the performance gain is negligible, the only win here is
simplifying the code, and maybe less chance of bugs in the future

as a result, this probably won't get merged anytime soon
(if at all), and would probably warrant bumping to v2
This commit is contained in:
ed 2024-03-24 21:53:28 +00:00
parent cb99fbf442
commit 7781e0529d
19 changed files with 81 additions and 613 deletions

View file

@ -170,12 +170,14 @@ class Cfg(Namespace):
)
class NullBroker(object):
def say(self, *args):
class NullUp2k(object):
def hash_file(*a):
pass
def ask(self, *args):
pass
class NullHub(object):
def __init__(self):
self.up2k = NullUp2k()
class VSock(object):
@ -206,7 +208,7 @@ class VHttpSrv(object):
self.asrv = asrv
self.log = log
self.broker = NullBroker()
self.hub = NullHub()
self.prism = None
self.bans = {}
self.nreq = 0