Idris2Doc : IO.Async.Loop

IO.Async.Loop

(source)
Utilities for working with work loops.

Reexports

importpublic IO.Async.Core
importpublic Data.Linear.Ref1

Definitions

recordFbrState : Type->Type
  Internal state of a running fiber.

Totality: total
Visibility: export
Constructor: 
FST : FiberImplresErrsresType->Nat->AsyncecurErrscurType->StackecurErrsresErrscurTyperesType->FbrStatee

Projections:
.comp : ({rec:0} : FbrStatee) ->Asynce (curErrs{rec:0}) (curType{rec:0})
0.curErrs : FbrStatee->ListType
0.curType : FbrStatee->Type
.fiber : ({rec:0} : FbrStatee) ->FiberImpl (resErrs{rec:0}) (resType{rec:0})
.mask : FbrStatee->Nat
0.resErrs : FbrStatee->ListType
0.resType : FbrStatee->Type
.stack : ({rec:0} : FbrStatee) ->Stacke (curErrs{rec:0}) (resErrs{rec:0}) (curType{rec:0}) (resType{rec:0})
dataRunRes : Type->Type
  Result of (partially) evaluate a fiber.

Totality: total
Visibility: public export
Constructors:
Done : RunRese
  The fiber has terminated with an `Outcome`, or we arrived at
an asynchronous boundary (`Asnc` data constructor) and the
fiber should be parked until a result is ready.
Cont : FbrStatee->RunRese
  Evaluation of the fiber is not yet finished, but should be
rescheduled by moving the fiber at the end of the event loop's
work queue. This happens a) after a certain number of evaluation
steps, or b) when `cede` is encountered.
interfaceEventLoop : Type->Type
  A context for submitting and running work packages asynchronously.

The basic functionality of an event loop is to allow us to spawn
new work packages, all of which will then be run concurrently (but not
necessarily in parallel), and to `cede` a running computation, so that
it will be processed later while allowing other work packages to be
processed first.

In addition, an event loop can support arbitrary additional effects, for
instance, the ability to setup timers, signal handlers, and asynchronous
`IO` actions. These additional capabilities are represented by type
parameter `e`, representing the event loop currently processing a work
package.

Parameters: e
Constructor: 
EL

Methods:
spawn : e->FbrStatee->IO1 ()
  Submits a fiber to be run by event loop `el`
limit : Nat
  Number of evaluation steps before a fiber should be rescheduled.

Implementation: 
EventLoopSyncST
spawn : EventLoope=>e->FbrStatee->IO1 ()
  Submits a fiber to be run by event loop `el`

Totality: total
Visibility: public export
limit : EventLoope=>Nat
  Number of evaluation steps before a fiber should be rescheduled.

Totality: total
Visibility: public export
runFbr : EventLoope=>e->FbrStatee->IO1 (RunRese)
Totality: total
Visibility: export
runAsyncWith : EventLoope=>e->Asynceesa-> (Outcomeesa->IO ()) ->IO ()
Totality: total
Visibility: export
runAsync : EventLoope=>e->Asynceesa->IO ()
Totality: total
Visibility: export