Closed akshayred closed 5 years ago
Nodes' worker can be async, therefore process()
is async. And formally, you can call the process again, without waiting for the previous done, but this will lead to conflict. Therefore, you must cancel the processing of the previous
https://rete.js.org/#/docs/engine
In general, for each change in the schema (nodes, connections, node data), it is necessary to perform processing. Due to the fact that workers can be asynchronous, the 'process' method is also asynchronous. Since the actions provoking the processing can be performed without waiting for the completion of the previous processing, we need the
abort
method, which waits for the completion of the previous processing and guarantees data integrity.
In above example why are we using engine.abort();