tsNetPost is asynchronous. Is the callback blocking?
Posted: Tue Feb 06, 2024 11:26 am
In my standalone, inside a loop, I do more than one tsNetPost to Azure at a time, while the app does other things that must not be blocked by a "post".
In order to not confuse the Azure WebApp, inside the loop I set a "wait for Flag" after each tsNetPost command.
Something like this:
It seems to be working but haven't tested it with big numbers.
So, while tsNetPost is not blocking, is the call back script also not blocking?
Thanks.
Trevix
In order to not confuse the Azure WebApp, inside the loop I set a "wait for Flag" after each tsNetPost command.
Something like this:
Code: Select all
repeat xxx
put false into sWebUploadDone --flag
put tsNetPost(pID,tURL,tHeaders,tServerString,"postResponse") into tError
wait until sWebUploadDone with messages
...
end repeat
on postResponse pID, pStatus, pBytes, pResult
put true into sWebUploadDone
--handle errors and returned data
...
...
end postResponse
So, while tsNetPost is not blocking, is the call back script also not blocking?
Thanks.
Trevix