Skip to content

Is it means the control of timing still depended on the user? #1

@musicq

Description

@musicq

time-slicing/index.js

Lines 8 to 10 in f75cf7a

do {
res = gen.next()
} while(!res.done && performance.now() - start < 25);

As the code shows, ts function just runs the user's function gen.next(), but don't compute its time cost. So if gen.next() spends too much time, it still blocks the browser, right?

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