receive 1 100ms ; wait 100ms for a message
join 1 2 500ms ; wait 500ms for a process to finish
If timeout is not be present, the instructions should block indefinitely.
Timeouts are not guaranteed to be met, that is if a 500ms is set there is no guarantee that the process resumes running after exactly 500 milliseconds, and it may as well resume after 791 milliseconds due to nondeterminism of scheduling.
The VM guarantees that the process will not be put on hold if it awaits a timeout, i.e. that it will not be moved out of a scheduler and put on the central run queue.
Both "receive" and "join" should accept timeouts to prevent blocking the process indefinitely. Proposed syntax:
Example:
If timeout is not be present, the instructions should block indefinitely. Timeouts are not guaranteed to be met, that is if a
500ms
is set there is no guarantee that the process resumes running after exactly 500 milliseconds, and it may as well resume after 791 milliseconds due to nondeterminism of scheduling.The VM guarantees that the process will not be put on hold if it awaits a timeout, i.e. that it will not be moved out of a scheduler and put on the central run queue.