Event loops: served on by default, the data relayed by the loops

loopmode is cb unless a configuration says otherwise, as -L2 had it
for a service: its clients on event loops, a connection's data relayed
by the loop itself where nothing but the sockets is between its sides.
A service whose clients cannot share a thread (threadperclient: PAM,
LDAP, FilePlugin, names resolved by the system, -ne) or listening for
connections back (-R) still gives each a thread, as do the standalone
services and builds without fibers. loopmode on and -L keep the loops
with the relay on the client's stack; loopmode off and -L0 a thread
for each client.

The man page tells of cb. tests/run.py --loopmode takes the mode
(cb, on, off) to give every configuration, with two loops; the Linux
workflow runs the suite once more with a thread for each client, which
is no longer what a configuration gets by default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Vladimir DubrovinandClaude Opus 5.5 committed 2026-10-28 11:49:51 +03:00
1 parent 143158e97f
commit 023eb8f830
8 files changed
+33 -18

No files matched your search

+6 -3
View File
@@ -58,11 +58,14 @@ def main():
help="keep the temporary directory")
parser.add_argument("-v", "--verbose", action="store_true",
help="print every check, not just the failures")
parser.add_argument("--loopmode", action="store_true",
help="serve the clients of every service on event loops")
parser.add_argument("--loopmode", choices=("cb", "on", "off"),
help="serve the clients of every service so (cb, the "
"default, and on: on two event loops; off: a thread "
"each)")
args = parser.parse_args()
if args.loopmode:
os.environ["THREEPROXY_TESTCONFIG"] = "loops 2\nloopmode on\n"
os.environ["THREEPROXY_TESTCONFIG"] = \
"loops 2\nloopmode %s\n" % args.loopmode
binary = args.binary or os.environ.get("BIN") or default_binary()
binary = os.path.abspath(binary)