Sat Jun 17 10:24:30 2023 +0300
Normal Python threading is subject to the Global Interpreter Lock,
which means only one thread gets to execute Python code at once.
This still allows concurrent I/O operations, but if request handling
requires long-running Python code, only one request would be handled
at any given time, slowing things down.
This commit adds a configurable number of RequestHandlers
that offload the processing of requests to separately running
processes. Several changes were necessary to allow passing data
between the main process and the workers, mostly to ensure that
everything is pickleable.
The main process still uses multiple threads to handle incoming
connections and do I/O with the clients.
README.md | 2 +- docs/api.rst | 12 +- example.ini | 25 +- gmcapsule/__init__.py | 9 +- gmcapsule/gemini.py | 623 +++++++++++++++++++++++++---------------- gmcapsule/modules/99_static.py | 4 +- 6 files changed, 415 insertions(+), 260 deletions(-)
=> Diff (Colored) | Diff (Colored, Plain Text) | 🔨 Patch
=> Parent d17e4e2 | Repository This content has been proxied by September (3851b).Proxy Information
text/gemini; charset=utf-8