Skip to content

Scheduler name bike-shedding #838

@benlesh

Description

@benlesh

Currently the trampoline scheduler is named immediate, and the microtask scheduler is named nextTick. There is als

I propose that we rename immediate to sync. I say this because immediate sort of implies that the scheduled action is going to take place right away, and that's not really true. It's going to be bumped from it's current call stack and executed next, but synchronously.

For nextTick, it's a little more debatable, it's pretty aptly named, but I think it would be more descriptive if it were named microtask, because ultimately that's the goal. To schedule it as a microtask after the current frame but before things like setTimeout.

... which brings me to another thing, we don't have a scheduler based off of setTimeout or requestAnimationFrame. The latter is DOM-specific, but given that we're modular now, I think there's grounds for including it in this library, it's an important scheduler.

Once we land on these names, I'll be writing some improved documentation on the matter.

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