A forum for Spin users
You are not logged in.
Pages: 1
Hi,
I have in the past written code much like this:
if
:: timeout -> skip;
:: someChan ! someMsg;
fi
if
:: timeout -> skip;
:: someChan ? someOtherMsg;
fi
... etc etc
Is there any way to do this with some sort of while-guard, like
while (! timeout) {
send and receive stuff
} else {
handle the fact that you've timed out / reached what would otherwise be a deadlock
}
? Thank you!
Last edited by Maxvonhippel (2020-01-13 17:50:24)
Offline
Fantastic, thank you! I had totally forgotten about those.
Offline
By the way, the -e flag is undocumented under -run when you do spin --. I know it's documented under ./pan but it would be useful for new users to also include it under -run in the spin -- output.
I'm happy to cut a pull request on github to do this, if you'd like. Is that the preferred way to contribute? Or would you prefer to just add it yourself, or is there some other process I should go through?
Offline
Pages: 1