← Back to context Comment by Veserv 2 days ago The original loop is:while (time() != timeout) {;}The fixed loop is:while (time() < timeout) {;} 12 comments Veserv Reply dpkirchner 2 days ago I see. I did not realize SECONDS was a built in bash variable. nh2 2 days ago It is still not a proper fix. It is still busy-looping 100% CPU.Given that Github Actions is quite popular, probably wasting large amount of energy.But probably good at generating billable Actions minutes.One can only hope that not many people use sleeps to handle their CI race conditions, as that itself is also not a proper fix. magicalhippo 2 days ago Clearly the job for a microservice. Accept number of seconds to wait as url, return content after that many seconds. Then just use curl in runner. 5 replies → dpkirchner 1 day ago Yeah, definitely not a proper fix.Maybe a more serious fix is something like "read -t $N". If you think stdin might not be usable (like maybe it will close prematurely) this option won't work, but maybe you can open an anonymous FD and read from it instead. 2 replies → xp84 2 days ago Me neither. I am over 40 and did not know this. Feels good to learn something today, in an unexpected place!
dpkirchner 2 days ago I see. I did not realize SECONDS was a built in bash variable. nh2 2 days ago It is still not a proper fix. It is still busy-looping 100% CPU.Given that Github Actions is quite popular, probably wasting large amount of energy.But probably good at generating billable Actions minutes.One can only hope that not many people use sleeps to handle their CI race conditions, as that itself is also not a proper fix. magicalhippo 2 days ago Clearly the job for a microservice. Accept number of seconds to wait as url, return content after that many seconds. Then just use curl in runner. 5 replies → dpkirchner 1 day ago Yeah, definitely not a proper fix.Maybe a more serious fix is something like "read -t $N". If you think stdin might not be usable (like maybe it will close prematurely) this option won't work, but maybe you can open an anonymous FD and read from it instead. 2 replies → xp84 2 days ago Me neither. I am over 40 and did not know this. Feels good to learn something today, in an unexpected place!
nh2 2 days ago It is still not a proper fix. It is still busy-looping 100% CPU.Given that Github Actions is quite popular, probably wasting large amount of energy.But probably good at generating billable Actions minutes.One can only hope that not many people use sleeps to handle their CI race conditions, as that itself is also not a proper fix. magicalhippo 2 days ago Clearly the job for a microservice. Accept number of seconds to wait as url, return content after that many seconds. Then just use curl in runner. 5 replies → dpkirchner 1 day ago Yeah, definitely not a proper fix.Maybe a more serious fix is something like "read -t $N". If you think stdin might not be usable (like maybe it will close prematurely) this option won't work, but maybe you can open an anonymous FD and read from it instead. 2 replies →
magicalhippo 2 days ago Clearly the job for a microservice. Accept number of seconds to wait as url, return content after that many seconds. Then just use curl in runner. 5 replies →
dpkirchner 1 day ago Yeah, definitely not a proper fix.Maybe a more serious fix is something like "read -t $N". If you think stdin might not be usable (like maybe it will close prematurely) this option won't work, but maybe you can open an anonymous FD and read from it instead. 2 replies →
xp84 2 days ago Me neither. I am over 40 and did not know this. Feels good to learn something today, in an unexpected place!
I see. I did not realize SECONDS was a built in bash variable.
It is still not a proper fix. It is still busy-looping 100% CPU.
Given that Github Actions is quite popular, probably wasting large amount of energy.
But probably good at generating billable Actions minutes.
One can only hope that not many people use sleeps to handle their CI race conditions, as that itself is also not a proper fix.
Clearly the job for a microservice. Accept number of seconds to wait as url, return content after that many seconds. Then just use curl in runner.
5 replies →
Yeah, definitely not a proper fix.
Maybe a more serious fix is something like "read -t $N". If you think stdin might not be usable (like maybe it will close prematurely) this option won't work, but maybe you can open an anonymous FD and read from it instead.
2 replies →
Me neither. I am over 40 and did not know this. Feels good to learn something today, in an unexpected place!