This commit is contained in:
Jared Wasinger 2024-02-22 20:31:31 -08:00
parent c7cd97fe1c
commit dc16ec33ee

View file

@ -248,9 +248,7 @@ func (sf *subfetcher) loop() {
sf.trie = trie sf.trie = trie
} }
// Trie opened successfully, keep prefetching items // Trie opened successfully, keep prefetching items
for { for keepRunning := range sf.wake {
select {
case keepRunning := <-sf.wake:
// Subfetcher was woken up, retrieve any tasks to avoid spinning the lock // Subfetcher was woken up, retrieve any tasks to avoid spinning the lock
sf.lock.Lock() sf.lock.Lock()
tasks := sf.tasks tasks := sf.tasks
@ -282,4 +280,3 @@ func (sf *subfetcher) loop() {
} }
} }
} }
}