dataframe-js icon indicating copy to clipboard operation
dataframe-js copied to clipboard

How can I pass DataFrame object to worker ?

Open antoniopol06 opened this issue 5 years ago • 1 comments

How can I pass DataFrame object to worker ?

I am trying to do that but I receive the following error:

DOMException: Failed to execute 'postMessage' on 'Worker': function Stat(df) {
    _classCallCheck(this, Stat);

    this.df = df;
    this.name = "stat";
  } could not be cloned.

antoniopol06 avatar Oct 07 '20 14:10 antoniopol06

Hi, In order to pass a DataFrame on a Worker or WorkerThread you have to serialize it before sending it and deserialize it on the dedicated Worker.

It's the case for all complex js objects.

Gmousse avatar Oct 25 '20 09:10 Gmousse