Skip to content

Commit

Permalink
Merge pull request #1795 from SUI-Components/feat/perf-queue
Browse files Browse the repository at this point in the history
feat(packages/sui-performance): move queue
  • Loading branch information
andresz1 authored Jul 30, 2024
2 parents eefa0ae + b066902 commit e13e7e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/sui-performance/src/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import {IdleQueue} from 'idlefy'

const queue = new IdleQueue({ensureTasksRun: true})

export function delayTask() {
return new Promise(resolve => {
setTimeout(resolve, 100)
Expand All @@ -12,6 +10,8 @@ export function delayTask() {
}

export function delayTaskUntilUrgent(options) {
const queue = new IdleQueue({ensureTasksRun: true})

return new Promise(resolve => {
queue.pushTask(resolve, options)
})
Expand Down

0 comments on commit e13e7e1

Please sign in to comment.