Android platform, Delphi Berlin : I suppose TRestRequest.Execute not beeing synchronous in some cases.
Android platform, Delphi Berlin : I suppose TRestRequest.Execute not beeing synchronous in some cases.
If you look at System.Net.HttpClient line 1155, method procedure THTTPClient.ExecuteHTTP, you will notice (I have shorten the code) that :
If TThread.CurrentThread.ThreadID = MainThread then
TThread.CreateAnonymousThread(procedure begin
ExecuteHTTPInternal(....);
Repeat until FTerminated;
end).start else
ExecuteHTTPInternal(....);
My issue is that I'm calling TRestRequest.Execute from an anonymous thread.... and I really need it to be blocking.
Any thought on this ?
If you look at System.Net.HttpClient line 1155, method procedure THTTPClient.ExecuteHTTP, you will notice (I have shorten the code) that :
If TThread.CurrentThread.ThreadID = MainThread then
TThread.CreateAnonymousThread(procedure begin
ExecuteHTTPInternal(....);
Repeat until FTerminated;
end).start else
ExecuteHTTPInternal(....);
My issue is that I'm calling TRestRequest.Execute from an anonymous thread.... and I really need it to be blocking.
Any thought on this ?
Comments
Post a Comment