8000 A way to detect "same task"? · Issue #9919 · whatwg/html · GitHub
[go: up one dir, main page]

Skip to content

A way to detect "same task"? #9919

@jan-ivar

Description

@jan-ivar

What is the issue with the HTML Standard?

mediaStreamTrack.stats.deliveredFrames says "Upon getting, run the expose video frame counters steps", which begin with: "Let taskId be a number unique to the current task." — Could task have an identifier instead?

image

For background, to avoid excessive task posting, we can get the data cross-thread and then cache it and clear it in the next task execution cycle (using Atomics, lockless ring buffer, mutex, etc.)

The simplest way to detect "same task" seemed to be to rely on a task identifier. But there currently isn't one (even though I believe some implementations might have one?)

While this might look like an optimization, we found actually specifying it this way had the least side-effects of the alternatives considered in w3c/mediacapture-extensions#108 (comment).

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

      0