MCPcopy Create free account
hub / github.com/porsager/postgres / setImmediate

Function setImmediate

cf/polyfills.js:219–229  ·  view source on GitHub ↗
(fn)

Source from the content-addressed store, hash-verified

217}
218
219function setImmediate(fn) {
220 const id = ids++
221 tasks.add(id)
222 queueMicrotask(() => {
223 if (tasks.has(id)) {
224 fn()
225 tasks.delete(id)
226 }
227 })
228 return id
229}
230
231function clearImmediate(id) {
232 tasks.delete(id)

Callers 3

writeFunction · 0.90
writeFunction · 0.50
writeFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected