docs: fix outdated comment on rebuild debounce behaviour
This commit is contained in:
		@@ -135,7 +135,6 @@ async function rebuildFromEntrypoint(
 | 
			
		||||
    toRebuild,
 | 
			
		||||
    toRemove,
 | 
			
		||||
    trackedAssets,
 | 
			
		||||
    lastBuildMs,
 | 
			
		||||
  } = buildData
 | 
			
		||||
 | 
			
		||||
  const { argv } = ctx
 | 
			
		||||
@@ -164,12 +163,12 @@ async function rebuildFromEntrypoint(
 | 
			
		||||
    toRemove.add(filePath)
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  // debounce rebuilds every 250ms
 | 
			
		||||
 | 
			
		||||
  const buildStart = new Date().getTime()
 | 
			
		||||
  buildData.lastBuildMs = buildStart
 | 
			
		||||
  const release = await mut.acquire()
 | 
			
		||||
  if (lastBuildMs > buildStart) {
 | 
			
		||||
 | 
			
		||||
  // there's another build after us, release and let them do it
 | 
			
		||||
  if (buildData.lastBuildMs > buildStart) {
 | 
			
		||||
    release()
 | 
			
		||||
    return
 | 
			
		||||
  }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user