FA
Size: a a a
FA
FA
t
FA
f
t
t
f
f
FA
f
SS
FA
f
FA
f
t
f
function loop(channel) {
// do something in async loop. Receive messages from network, process them, etc.
...
// once some predicate is held, send message to channel
channel.send(msg)
}
// create a channel
let channel = ...;
// then, pass that channel to loop
loop(channel);
// then, wait for loop to report that predicate is held
await channel.receive();SS