E1125: realtime code calls a verb with a forbidden effect

View source

A verb marked meta realtime must stay fast and predictable.

A verb marked meta realtime must stay fast and predictable. It may not call a verb with one of the effects blocking, clock, filesystem, network, allocation or entropy (ADR-0094). The restriction holds through every call the verb makes. The error points at the call and names the callee and the effect.

Example

actus
meta effect("blocking")
verb wait() -> Int {
    return 0;
}

meta effect("blocking")
meta realtime
verb step() -> Int {
    return wait();
}

verb main() {
}

Fix

Keep the blocking call outside the realtime verb. The realtime verb takes the data it needs and does the bounded work only.

actus
meta effect("blocking")
verb wait() -> Int {
    return 0;
}

meta realtime
verb step(erg input: Int) -> Int {
    return input;
}

verb main() {
}

Run actus explain E1125 in your terminal to read this entry offline. Browse Modules & rules or all error codes.