github.com/benz9527/xboot@v0.0.0-20240504061247-c23f15593274/lib/queue/delay_queue_linux.go (about)

     1  //go:build linux && !windows
     2  // +build linux,!windows
     3  
     4  package queue
     5  
     6  import (
     7  	"github.com/benz9527/xboot/lib/infra"
     8  )
     9  
    10  func (dq *ArrayDelayQueue[E]) PollToChan(nowFn func() int64, C infra.SendOnlyChannel[E]) {
    11  	dq.exclusion.Lock()
    12  	defer dq.exclusion.Unlock()
    13  
    14  	dq.poll(nowFn, C)
    15  }