← All compilation units

Flyology.HTTP.Server.Request_Tasks

Description

Connects structured task scopes to an HTTP request without lending the Exchange or connection to child tasks.

Configure

procedure Configure
  (Item : in out Operations.Scope;
   X    : Applications.Exchange;
   Cancel_Siblings_On_Failure : Boolean := True)

Inherit the Exchange cancellation identity and current absolute deadline. Subsequent Exchange narrowing does not retroactively update a configured scope, so configure it after request middleware completes. The scope links parent cancellation downward into a private child token; sibling failure never requests the parent request token. Item must be declared with Parent => X.Cancellation so Ada enforces the request-token borrow.

Parameters
Item

Request task scope

X

Borrowed request exchange

Cancel_Siblings_On_Failure

Whether one failure cancels siblings

Execute

procedure Execute
(Input    : Input_Type;
Token    : access Flyology.Cancellation.Token;
Deadline : Ada.Real_Time.Time;
Result   : out Result_Type)
Parameters
Input
Token
Deadline
Result

Input_Type

type Input_Type is private;

Operations

package Operations is new
  Flyology.Task_Scopes (Input_Type, Result_Type, Execute);

General structured operation implementation used by this adapter.

Result_Type

type Result_Type is private;