Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add promise version setTimeout with AbortSignal support #6201

Closed
wants to merge 1 commit into from

Conversation

saschanaz
Copy link
Member

@saschanaz saschanaz commented Dec 6, 2020

Closes #617

  • At least two implementers are interested (and none opposed):
  • Tests are written and can be reviewed and commented upon at:
    • TODO
  • Implementation bugs are filed:
    • Chrome: …
    • Firefox: …
    • Safari: …

(See WHATWG Working Mode: Changes for more details.)


💥 Error: Wattsi server error 💥

PR Preview failed to build. (Last tried on Jan 15, 2021, 8:00 AM UTC).

More

PR Preview relies on a number of web services to run. There seems to be an issue with the following one:

🚨 Wattsi Server - Wattsi Server is the web service used to build the WHATWG HTML spec.

🔗 Related URL

Parsing MDN data...
Parsing...



If you don't have enough information above to solve the error by yourself (or to understand to which web service the error is related to, if any), please file an issue.

@saschanaz saschanaz marked this pull request as ready for review December 6, 2020 21:48
@domenic
Copy link
Member

domenic commented Dec 6, 2020

I think Chrome is more interested in supporting

const promise = scheduler.postTask(fn, { delay: 100, signal });

as part of the effort at https://github.com/WICG/main-thread-scheduling/blob/master/PrioritizedPostTask.md#posting-delayed-tasks . Maybe @shaseley can confirm?

@shaseley
Copy link

shaseley commented Dec 7, 2020

Yes, we are indeed proposing scheduler.postTask for this, which additionally enables (dynamic) prioritization. It's currently behind a flag and in origin trial in Chrome. We haven't drafted a spec yet, but are hoping to in the near future.

@saschanaz saschanaz marked this pull request as draft December 10, 2020 19:51
@domenic domenic added addition/proposal New features or enhancements needs implementer interest Moving the issue forward requires implementers to express interest labels Dec 11, 2020
Base automatically changed from master to main January 15, 2021 07:58
@saschanaz saschanaz closed this Oct 30, 2021
@saschanaz saschanaz deleted the timers-promise branch October 30, 2021 01:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addition/proposal New features or enhancements needs implementer interest Moving the issue forward requires implementers to express interest
Development

Successfully merging this pull request may close these issues.

A setTimeout that returns a promise that resolves after specified time.
3 participants