forked from forgejo/forgejo
Queue & Setting: Add worker pool implementation
This commit is contained in:
parent
85042634fc
commit
9fb051654a
10 changed files with 92 additions and 25 deletions
|
@ -22,7 +22,7 @@ func TestChannelQueue(t *testing.T) {
|
|||
|
||||
nilFn := func(_ context.Context, _ func()) {}
|
||||
|
||||
queue, err := NewChannelQueue(handle, ChannelQueueConfiguration{QueueLength: 20}, &testData{})
|
||||
queue, err := NewChannelQueue(handle, ChannelQueueConfiguration{QueueLength: 20, Workers: 1}, &testData{})
|
||||
assert.NoError(t, err)
|
||||
|
||||
go queue.Run(nilFn, nilFn)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue