Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
C0D4681462y@johnmelodyme I was praying there was a better way, but nope 🥲
You just keep making a call to see if it's done yet. -
Hazarth94722yYeah, not unusual. It's a busy waiting loop. I hope you at least added some Sleeps to it, so it actually gives the CPU some rest. Obviously best way would be to use synchronization primitives, but if that's not available then its ok to use busy waiting
-
atheist98262yHow to make algorithms faster in c++:
While true.
This guy knows his stuff:
https://youtube.com/watch/... -
Even almighty AWS sins.
Many of their async API operations only offer polling to check results.
Many do not notice because the CLI/SDKs hide it from you... -
atheist98262y@joewilliams007 IIRC they do a long poll, so a request that only times out after a few minutes, get an early response if there's anything to notify
-
@atheist
I dont remember how exactly it looked like but in general, phone opens up connection and lets it sit idle
Related Rants
Forgive me devLords, for I have sinned.
Today, I took while() loop and made it true, it was a dirty ordeal, however it's not entirely my fault, you see the api I called doesn't have a webhook of any kind and doesn't return results in real time either, you have to poll for them..... so here I am writing while(true){} to poll for results that could take seconds or even hours to finish.
😟
rant
i just want my data
!webhook
api
who needs real time apis anyway
wk336