pagelet_server_task_result

Description

function pagelet_server_task_result(
  resource $task,
  mixed &$headers,
  mixed &$code,
  int $timeout_ms = 0,
): string

Block and wait until pagelet task finishes or times out.

Parameters

  • resource $task - The pagelet task handle returned from pagelet_server_task_start().
  • mixed &$headers - HTTP response headers.
  • mixed &$code - HTTP response code. Set to -1 in the event of a timeout.
  • int $timeout_ms = 0 - How many milliseconds to wait. A timeout of zero is interpreted as an infinite timeout.

Return Values

  • string - - HTTP response from the pagelet.