documentationfor yFiles for HTML 2.6

LayoutExecutorAsyncWorker

Executes an algorithm or ILayoutAlgorithm on a graph in a separate execution context.

Inheritance Hierarchy
LayoutExecutorAsyncWorker

Remarks

This class implements the "worker" part for the LayoutExecutorAsync. It will serve requests started by the layout executor in the main thread, perform the actual calculations and send back the results. This allows the main thread to continue and the UI to stay responsive when longer layout calculations need to be performed, or multiple layout calculations should be carried out in parallel.

Instances of this class will deserialize all the information received from the LayoutExecutorAsync, let the callback passed to the constructor perform the actual calculations, and send back the results. Instances of this class often execute in a Web Worker, but it could also be running on a different machine or a server, separate from the browser.

The actual transmission of the serialized data from and to the other context is not part of this implementation. Rather the reception of the data needs to be implemented by users of this class. The data will then be passed to the process method, for deserialization.

Related Reading in the Developer's Guide

The ability to execute layouts asynchronously via web workers is presented in detail in the section Asynchronous Layout Calculation.

Type Details

yfiles module
view-layout-bridge
yfiles-umd modules
view-layout-bridge
Legacy UMD name
yfiles.layout.LayoutExecutorAsyncWorker

See Also

Constructors

Methods

Constants