Skip to content

Commit

Permalink
feat(packages/sui-performance): move queue
Browse files Browse the repository at this point in the history
  • Loading branch information
andresz1 committed Jul 29, 2024
1 parent eefa0ae commit b066902
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 b066902

Please sign in to comment.