Next: External multiple out events, Previous: Indirect multiple out events, Up: Execution Semantics [Contents][Index]
The in-event on the provides port (p.a
) blocks (does not return)
until a reply is handled. This happens in the handling of the requires
port out-event (r.b
). Also see blocking
.
interface I { in void a (); out void b (); behavior { on a: b; } } interface I2 { in void a (); out void b (); behavior { bool idle = true; [idle] on a: idle = false; [!idle] on a: illegal; [!idle] on inevitable: {idle = true; b;} } } component indirect_blocking_out { provides blocking I p; requires I2 r; behavior { blocking on p.a (): r.a (); on r.b (): {p.b (); p.reply ();} } }
If the keyword blocking
in above example would be omitted it
would lead to an erroneous situation since the provides in-event
(p.a
) would return before the provides out-event (p.b
)
would have been generated.