modus
Menu
On this page

The entry requests_pace

The asker of the test of fan-out and the pace . It starts requests_reader, then starts server with a wiring list of three rows from the record output requests:

  • to the record input held of the reader, of the pace Always_Holds_Writer, in a ring of PACE_RING_CAPACITY compartments;
  • to the record input gapped of the reader, of the pace Never_Holds_Writer, in a ring of the same capacity;
  • to this process as its asker, of the pace Writer_Chooses, in a ring of the default capacity, which holds each record of the test: this is the fast reader.

The tool then sends PACE_REQUESTS requests to the server. This process reads each record of its ring, and checks that the slow reader did not change what the fast reader receives: the joined record of 0, then each record in order, with no gap. The counts that the server publishes in the head page of its ring say the rest: it was held exactly twice, once for each phase of the slow reader, and refused no record. Then it waits until the principal stops the server, stop("server") in the console, and the slow reader reads the end of its two rings and stops.

Start: start("requests_pace") in the console, once server does not run. What a reader sees: no window; one line "requests_pace: ...: as it must", or a line "requests_pace: WRONG: ...". It stops itself with the outcome Done, or Failed after a WRONG line.

See: Record outputs and record inputs of a module: typed streams of records between processes: Fan-out and flow control in the repository

requests_pace module with an entry

Hash
8e71c35f74291e1a7e15a4e4ac90498f2c6f9e1ba729af523e66e8aa2cc40d40
Size
66017 bytes
Exports
0
Imports
0
Imported by
0
License
MIT

The asker of the test of fan-out and the pace

FactValue
KindModules with an entry
Sourcesrc/modules/tests/requests_pace
Boot imageyes: in the boot image, 66017 bytes in this build
Build settingsnone: the defaults of the source
Importsnone
Imported bynone

Neighbours

It imports no module, and no module imports it. The module graph shows it with the other modules that have no edge.

Exports

ExportWhat it does
entry()

entry

entry()
Form
The entry of the module: one parameter, an address, fixed by the contract.
Source
src/modules/tests/requests_pace/main.odin:176

Read from the source of the module, as the build reads it to describe the exports (tools/modustool/build/describe.odin).

What the root service gives it

WhatValueAs the root service says
GrantsThe asker of the test of fan-out and the pace: it starts its slow reader and server with a wiring list, and reads server.requests itself. Start and Wire are commands of the root ring.
Other terms of its start grant setnone
Budget that it asks for
  • the least budget
No MODULE_BUDGET in its source: it asks for the least budget.

The start grant set is read from start_grant_sets in src/modules/system/root/start_grant_sets.odin. The stated budget is read from the constant MODULE_BUDGET of the source of the module; the build adds the counted parts and writes the sum in the module (tools/modustool/build/budget_count.odin); the root service accepts it up to the largest budget of a process, and adds the limits of processor time and of log records (src/modules/system/root/budgets.odin).

requests global variable of the package server

requests: system.Record_Output(Access_Record)

One request that the server answered.

src/modules/demonstrations/server/requests.odin:35