Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 12403x 12403x 12403x | import { run_all } from '../../shared/utils.js'; let is_task_queued = false; let is_raf_queued = false; /** @type {Array<() => void>} */ let current_queued_tasks = []; /** @type {Array<() => void>} */ let current_raf_tasks = []; function process_task() { is_task_queued = false; const tasks = current_queued_tasks.slice(); current_queued_tasks = []; run_all(tasks); } function process_raf_task() { is_raf_queued = false; const tasks = current_raf_tasks.slice(); current_raf_tasks = []; run_all(tasks); } /** * Synchronously run any queued tasks. */ export function flush_tasks() { if (is_task_queued) { process_task(); } if (is_raf_queued) { process_raf_task(); } } |