// // Copyright 2026 DXOS.org // // CF Workers / Node fallback: there is no main thread to yield to. // scheduleTask runs the callback on the next microtask; yieldOrContinue is a microtask hop. type ScheduleOptions = { strategy?: 'smooth' | 'interactive' | 'idle'; signal?: AbortSignal }; export const scheduleTask = async (callback: () => T | Promise, _options?: ScheduleOptions): Promise => { await Promise.resolve(); return callback(); }; export const yieldOrContinue = async (_priority: 'smooth' | 'interactive' | 'idle'): Promise => { await Promise.resolve(); };