mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-24 20:47:16 +00:00
save
This commit is contained in:
parent
93d594cc8a
commit
ff3e6e629b
@ -316,14 +316,14 @@ func (q *ResultsQueueIter) PopNext() *TxTask {
|
||||
}
|
||||
|
||||
func (q *ResultsQueue) Drain(ctx context.Context) error {
|
||||
q.Lock()
|
||||
l := q.results.Len()
|
||||
q.Unlock()
|
||||
// if queue is empty, then need block to wait new results
|
||||
if l > 0 {
|
||||
q.drainNoBlock(nil)
|
||||
return nil
|
||||
}
|
||||
//q.Lock()
|
||||
//l := q.results.Len()
|
||||
//q.Unlock()
|
||||
//if queue is empty, then need block to wait new results
|
||||
//if l > 0 {
|
||||
// q.drainNoBlock(nil)
|
||||
// return nil
|
||||
//}
|
||||
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
|
Loading…
Reference in New Issue
Block a user