Skip to content

Worker threads and C++ backed objects #2754

Closed
@Flackus

Description

@Flackus
  • Node.js Version: 12.16.3
  • OS: Linux
  • Scope: runtime
  • Module (and version): worker_threads

Hi, I've been recently playing with worker threads as in version 12.16.3.

The doc explicitly says that you can't pass a C++ backed object via postMessage: https://nodejs.org/dist/latest-v12.x/docs/api/worker_threads.html#worker_threads_port_postmessage_value_transferlist
And this is true, you can't :) The standard makes it pretty obvious.

Any chance someone may shed some light on why is it so? Or even better, maybe someone has already found a workaround?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions