Next: Component Types, Previous: Component Behavior, Up: Components [Contents][Index]
An async port is a requires
of builtin type dzn.async
which is defined in the behavior of a component.
async-port ::= "requires" "dzn.async" async-parameter-list? identifier ";" async-parameter-list ::= "(" async-parameter ("," async-parameter)* ")" async-parameter ::= data-type identifier
For example:
requires dzn.async (int i) defer;
The builtin dzn.async
interface can be represented like this:
namespace dzn { interface async (formals) { in void req (formals); in void clr (); out void ack (formals); behavior { bool idle = true; [idle] { on req: idle = false; on clr: {} } [!idle] { on clr: idle = true; on inevitable: {ack; idle = true;} } } } }
Note: The use of
dzn.async
is discouraged for new programs, it will be replaced bydefer
in version 2.16, see the “wip-defer” branch.