Skip to content

TypeError: Invalid value used as weak map key #7

@HananoshikaYomaru

Description

@HananoshikaYomaru
import { threaded } from "multithreading";

const test = 3;

const add = threaded(async function* (a, b) {
  yield test;
  console.log(test);
  return a + b;
});

console.log(await add(5, 10)); // 15

error

/node_modules/.pnpm/[email protected]/node_modules/multithreading/dist/index.mjs:810
      valueOwnershipQueue.set(context[key], []);
                          ^
TypeError: Invalid value used as weak map key

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions