Skip to content

Use serialization option for child process communication #2298

@sindresorhus

Description

@sindresorhus

childProcess.fork received a new option called serialization, which would let us use the V8 clone algorithm for passing messages instead of JSON. We could then pass types like Buffer.

It was added in Node.js 13.2.0, so we cannot use this until we target Node.js 14.

https://nodejs.org/en/blog/release/v13.2.0/
https://nodejs.org/api/child_process.html#child_process_child_process_fork_modulepath_args_options

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions