Created
February 14, 2018 21:20
-
-
Save bnielsen1965/b12940fa8108a23e2708fe7fc260feed to your computer and use it in GitHub Desktop.
button threads
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
parent child | |
request lock on mutex :loop | |
create child thread request lock on mutex (may be a timeout) | |
:loop | |
poll for button change | |
release lock on mutex | |
wait on barrier release lock on mutex (if not timeout) | |
wait on barrier (if not timeout) | |
request lock on mutex wait on barrier (if not timeout) | |
wait on barrier process button state based on button change | |
goto :loop goto :loop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment