Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Piscina.move #59

Merged
merged 1 commit into from May 16, 2020
Merged

Implement Piscina.move #59

merged 1 commit into from May 16, 2020

Conversation

jasnell
Copy link
Collaborator

@jasnell jasnell commented May 15, 2020

Example worker.js

const { move } = require('piscina');

module.exports = () => {
  // transfers the arraybuffer rather than cloning it.
  return move(new ArrayBuffer(10));
};

Fixes: #58

Copy link
Collaborator

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@addaleax
Copy link
Collaborator

Just fyi, I am reviewing this and I’ll have a few comments ;)

@jasnell
Copy link
Collaborator Author

jasnell commented May 15, 2020

I’ll have a few comments ;)

I suspected as much 😄

README.md Outdated Show resolved Hide resolved
src/common.ts Show resolved Hide resolved
src/common.ts Outdated Show resolved Hide resolved
src/index.ts Show resolved Hide resolved
src/common.ts Outdated Show resolved Hide resolved
src/index.ts Outdated Show resolved Hide resolved
@jasnell
Copy link
Collaborator Author

jasnell commented May 16, 2020

@addaleax ... updated! :-)

src/worker.ts Show resolved Hide resolved
src/index.ts Show resolved Hide resolved
@addaleax addaleax merged commit 8a9bc6d into master May 16, 2020
@addaleax addaleax deleted the move branch May 16, 2020 02:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: Interface Transferable / Piscina.move()
3 participants