Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Different procedures in OnClick event
#2
Yes, you can use TTask from the Parallel Programming Library (PPL) to execute the web service call asynchronously, even in the context of IntraWeb (IW) applications, which can be multithreaded.
Here's a general approach to achieve this:
Execute the Database Operation Synchronously: Since this operation is quick and doesn't involve waiting for external resources, you can perform it directly in the OnClick event.
Execute the Web Service Call Asynchronously: Use TTask to handle the web service call asynchronously. This way, the UI remains responsive, and you don't block the main thread while waiting for the web service response.
Reply


Messages In This Thread
Different procedures in OnClick event - by David1 - 09-03-2024, 01:17 PM
RE: Different procedures in OnClick event - by lossstarry - 09-04-2024, 08:32 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)