Forum > Networking and Web Programming

We want call text api in async

(1/1)

Prakash:
How to call rest api async in Lazarus.

Delphi I think it support task

Warfley:
TTask in Delphi is basically just a Thread in Disguise. There is no real async Tasking (as you might know it from other languages like C#, Javascript, Python and co.) in Delphi.

So from this point of view, you can simply use TThread to make your request be executed in parallel and react to it finishing

Thaddy:
https://wiki.freepascal.org/Asynchronous_Calls

But in trunk/main you can use an anonymous procedure call using TThread.

Both methods are somewhat equivalent to TTask (which is easy to implement with both options).

Prakash:
Thanks. I have implemented in http calls , it is working .

Navigation

[0] Message Index

Go to full version