Elephant Man <conanospamic@gmail.com>: Jan 27 08:54PM Article d'annulation émis par un modérateur JNTP via Nemo. |
Horizon68 <horizon@horizon.com>: Jan 27 11:00AM -0800 Hello.. Benefits of Asynchronous Programming There are two things which are very important for any application – Usability and Performance. Usability because say a user clicks on a button to save some data. This requires multiple smaller tasks like reading and populating data in internal object, establishing connection with SQL and saving it there etc. As SQL runs on another machine in network and runs under different process, it could be time consuming and may take bit longer. So, if the application runs on a single thread then the screen will be in hanged state till all the tasks completes which is a very bad user experience. That's why nowadays many applications and new frameworks completely rely on asynchronous model. Performance of an application is also very important. It has been seen that while executing a request, around 70-80% of the time gets wasted while waiting for the dependent tasks. So, it can be maximum utilized by asynchronous programming where once the task is passed to another process (say SQL), current thread saves the state and available to take another task. When the SQL task completes any thread which is free, can take it up further. And as you have noticed i have implemented a portable and efficient implementation of a future in Delphi and FreePascal, i think you can also use it for Asynchronous Programming, look at GetIsReady() method etc. inside the source code to see how to use it for Asynchronous Programming. You can download my portable and efficient implementation of a future in Delphi and FreePascal version 1.05 from: https://sites.google.com/site/scalable68/a-portable-and-efficient-implementation-of-a-future-in-delphi-and-freepascal Thank you, Amine Moulay Ramdane. |
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page. To unsubscribe from this group and stop receiving emails from it send an email to comp.programming.threads+unsubscribe@googlegroups.com. |
No comments:
Post a Comment