Skip to content
This repository has been archived by the owner on Aug 17, 2024. It is now read-only.

How can I pass DataFrame object to worker ? #114

Open
antoniopol06 opened this issue Oct 7, 2020 · 1 comment
Open

How can I pass DataFrame object to worker ? #114

antoniopol06 opened this issue Oct 7, 2020 · 1 comment
Labels

Comments

@antoniopol06
Copy link

antoniopol06 commented Oct 7, 2020

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.
@Gmousse
Copy link
Owner

Gmousse commented Oct 25, 2020

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.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants