Skip to content

Use scheduler.postTask when implementing EM_TIMING_SETIMMEDIATE#26985

Open
sbc100 wants to merge 1 commit into
emscripten-core:mainfrom
sbc100:postTask
Open

Use scheduler.postTask when implementing EM_TIMING_SETIMMEDIATE#26985
sbc100 wants to merge 1 commit into
emscripten-core:mainfrom
sbc100:postTask

Conversation

@sbc100
Copy link
Copy Markdown
Collaborator

@sbc100 sbc100 commented May 20, 2026

IIUC this API is better than setTimeout(0) or postMessage() in terms of being a polyfill for the old/deprecated setImmediate API.

Its not clear if/when safari will implement this API so it will likely need to be feature detected for the foreseeable.

@sbc100 sbc100 requested a review from dschuff May 20, 2026 21:33
@sbc100 sbc100 changed the title Use Scheduler.postTask when implementing EM_TIMING_SETIMMEDIATE Use scheduler.postTask when implementing EM_TIMING_SETIMMEDIATE May 20, 2026
@sbc100 sbc100 enabled auto-merge (squash) May 20, 2026 22:34
IIUC this API is better than `setTimeout(0)` or `postMessage()` in terms
of being a polyfill for the old/deprecated setImmediate API.

Its not clear if/when safari will implement this API so it will likely
need to be feature detected for the foreseeable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants