首页 > 其他分享 >[RxJS] Defer task execution with the asapScheduler (microtask)

[RxJS] Defer task execution with the asapScheduler (microtask)

时间:2022-10-05 02:44:05浏览次数:63  
标签:Defer task asapScheduler microtask queue execution

asapScheduleris similar to queueMicroTask()and Promise.  AsapScheduler lets you schedule work on the microtask queue, executing task as soon as possible, once all synchronous code has been executed. Be warned though, that heavy operations within thte Microtask queue will block the UI until the queue is cleared.    

<iframe src="https://stackblitz.com/edit/rxjs-fa8byn?embed=1&file=index.ts" style="width: 100%; height: 500px"></iframe>

 

标签:Defer,task,asapScheduler,microtask,queue,execution
From: https://www.cnblogs.com/Answer1215/p/16754944.html

相关文章