Skip to content

Interaction with iterator helpers #75

Open
@andreubotella

Description

@andreubotella

In a previous meeting we agreed that, although built-in iterators should not propagate the creation context by default, iterator helpers should probably propagate it:

const var1 = new AsyncContext.Variable();

const iter = Iterator.from([42]);
const callback = (v) => {
  return var1.get();
};
const mapped = var1.run("foo", () => {
  return iter.map(callback);
});

console.log(mapped.next());  // {value: "foo", done: false}

This needs modifications on the (sync and async) iterator helpers spec text.

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