Created
December 3, 2018 00:48
-
-
Save mrnkr/a24f465db1c7ecf74a980b0100dda763 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task Alice is | |
end | |
task body Alice is | |
begin | |
loop | |
Yard.Request; | |
Walk_Dog; | |
Yard.Release; | |
end loop | |
end Alice; | |
task Bob is | |
end | |
task body Bob is | |
begin | |
loop | |
Yard.Request; | |
Walk_Dog; | |
Yard.Release; | |
end loop | |
end Bob; | |
task Yard is | |
entry Request; | |
entry Release; | |
end | |
task body Yard is | |
begin | |
loop | |
accept Request; | |
accept Release; | |
end loop | |
end Yard; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment