Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
25 lines (19 sloc) 515 Bytes
---------------------------- MODULE first_queue -----------------------------
EXTENDS Sequences, TLC
(* --algorithm queue
variable queue = <<"first message", "second message">>,
msg = "";
\* Receive a message from the queue
macro recv(queue, receiver)
await queue # <<>>;
receiver := Head(queue);
queue := Tail(queue);
end macro
recv(queue, msg);
print msg;
recv(queue, msg);
print msg;
end algorithm *)