Changes

m
Line 3: Line 3:  
=== Synchronous vs asynchronous ===
 
=== Synchronous vs asynchronous ===
 
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
 
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
Most of MacroDroid actions take a minuscule amount of time to execute. But some actions such as HTTP request or a shell script action can take a significant time to complete. Some of these actions have an option to "Block next action until complete" in their configuration GUI. If this option is enabled subsequent actions will wait until this action completes before continuing. If the option is disabled the action will run asynchronously while other actions continue.
+
MacroDroid actions typically execute quickly, but certain actions like HTTP requests or shell scripts may take longer. To ensure that subsequent actions wait for these longer actions to complete before continuing, enable the 'Block next action until complete' option in the action's configuration GUI. Otherwise, the action will run asynchronously while other actions continue.
   −
In conventional programming languages you would probably be able to pass a callback to call when the execution is complete to perform some other actions after the asynchronous action has completed (possibly even work with the data if the asynchronous action returned some), but because MacroDroid inner workings are rather arbitrary there is usually no such systematic option and you need to rely on different workarounds.
+
In traditional programming languages, you could pass a callback function to execute after the asynchronous action is complete. This allows you to perform additional actions or work with the data returned by the asynchronous action. However, MacroDroid's inner workings are arbitrary, so there is no systematic option for this. Instead, you must rely on different workarounds.
 
</pre>
 
</pre>
  
editors
1,590

edits