diff options
| author | eunhhu <[email protected]> | 2026-09-28 04:31:43 +0100 |
|---|---|---|
| committer | eunhhu <[email protected]> | 2026-09-28 04:31:43 +0100 |
| commit | eed3b0d022a5145be06d87140a747da1a82f0f9d (patch) | |
| tree | f3abf7322b1ef026c7b37b83d14202828abd52a9 /benchmarks/http/run.py | |
| parent | e5d9b792497ccbc71ccd777497d40c7a8f8c23bf (diff) | |
| download | pure-eed3b0d022a5145be06d87140a747da1a82f0f9d.tar.gz pure-eed3b0d022a5145be06d87140a747da1a82f0f9d.zip | |
Walk a list in a handler, and fill a list with a message's rows
EACH runs the block that follows in a handler once for every item its list
has when it begins, in order, with ROW the item: the block may change
states, the list's items (a field, or removing one) and other lists, but
may not insert into the list it walks, hold another walk or reply, so a
walk runs at most its items times its block. Removing the walked item, or
one before it, moves the walk with it, so no item is skipped. A fold in
the block reads the walked item as OUTER_ROW, as a fold in a column reads
its row. SQL's UPDATE ... WHERE and DELETE ... WHERE are a walk.
A message field may now be rows (type 5, naming a list state): records
laid out as the list's stored form, filling that list, whose flags hold
PURE_LIST_ROWS and whose name is the field's path (order.lines), when the
message arrives; rows that are not whole fail it (limit). A list of rows
is emptied when every event ends, is never saved, and its changes are not
logged for undoing, so a handler walks, folds and counts a message's rows
as any list, and may use one as a scratch table within its event. An
output has no rows. pure_list_clear lets a list's items go.
walks checks a shop against a model over 3,000 random events: orders
whose rows each take stock and are logged, all or nothing (997 applied,
1,322 failed and undone, by an item not stocked or not enough of it), and
a clean that walks the stock removing items (83 while walking, 32 of them
before the walked item). Nine refusals are checked, and 20,000 damaged
walk modules run safely with no rows left after any event; all under
ASan and UBSan too.
Diffstat (limited to 'benchmarks/http/run.py')
0 files changed, 0 insertions, 0 deletions
