Powered by Zoomin Software. For more details please contactZoomin

HERE Maps API for JavaScript - API Reference

Product category
Technology
Doc type
Version
Product lifecycle
This publication

HERE Maps API for JavaScript - API Reference: Class: Task

Table of Contents

Class: Task

new H.util.AsyncQueue.Task ()

This class represents a task as a cancelable work item managed by the AsyncQueue.

Implements

Methods

cancel ()

This method provides the default implementation for cancelling a task. It has an effect only if the task is cancelled before it is processed. To implement task-specific cancelation, use the method setCancelFn() on the AsyncQueue object.

done (result, opt_error)

This method signals that the processing of a task is complete. The method must be called from the task processing function to inform the queue that further tasks can be processed.

Name Type Description
result *

The result of the task processing operation

opt_error * optional

An optional error message to use in the event of an error during the processing of the task.

setCancelFn (cancelFn)H.util.AsyncQueue.Task

This method sets a function to be invoked when a task-specific operation is to be canceled to allow for ad-hoc canceling during the processing of the task.

Name Type Description
cancelFn function nullable

The function to be called when canceling task

Returns:
Type Description
H.util.AsyncQueue.Task An object representing the cancelled task
Was this article helpful?
TitleResults for “How to create a CRG?”Also Available inAlert