I have a go-loop reading vals from a port in ClojureScript. After a pre-defined timeout (say, 5 seconds) I need to exit the loop and if no vals appeared for more than another predefined timeout (say, 200 milliseconds) I also need to exit the loop.
By exciting the loop I mean, end it and run something else, another function for example.
Is this possible?