GuzzleHttpPromisetask

Adds a function to run in the task queue when it is next `run()` and returns a promise that is fulfilled or rejected with the result.

Description

GuzzleHttp\Promise\task( (callable) callable $task ); 

Parameters (1)

0. $task (callable) => callable $task
Task function to run.

Usage

  1. if ( !function_exists( 'GuzzleHttp\Promise\task' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'w3-total-cache/lib/Azure/GuzzleHttp/Promise/functions.php'; 
  3.  
  4. // Task function to run. 
  5. $task = callable $task; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = GuzzleHttp\Promise\task($task); 
  9.  

Defined (1)

The function is defined in the following location(s).

/lib/Azure/GuzzleHttp/Promise/functions.php