pagelet_server_task_result

Block and wait until pagelet task finishes or times out

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

Parameters

  • resource $task - The pagelet task handle returned from pagelet_server_task_start().
  • inout mixed $headers - HTTP response headers.
  • inout 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.

Returns

  • string - - HTTP response from the pagelet.