Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Upstream
Gitea
Commits
315d9286
Unverified
Commit
315d9286
authored
5 years ago
by
zeripath
Committed by
GitHub
5 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Fix Workerpool deadlock (#10283) (#10284)
* Prevent deadlock on boost * Force a boost in testchannelqueue
parent
5525452b
release/v1.11
v1.11.8
v1.11.7
v1.11.6
v1.11.5
v1.11.4
v1.11.3
v1.11.2
v1.11.1
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/queue/queue_channel_test.go
+3
-2
modules/queue/queue_channel_test.go
modules/queue/workerpool.go
+1
-1
modules/queue/workerpool.go
with
4 additions
and
3 deletions
+4
-3
modules/queue/queue_channel_test.go
View file @
315d9286
...
...
@@ -25,12 +25,13 @@ func TestChannelQueue(t *testing.T) {
queue
,
err
:=
NewChannelQueue
(
handle
,
ChannelQueueConfiguration
{
QueueLength
:
20
,
Workers
:
1
,
QueueLength
:
0
,
MaxWorkers
:
10
,
BlockTimeout
:
1
*
time
.
Second
,
BoostTimeout
:
5
*
time
.
Minute
,
BoostWorkers
:
5
,
Workers
:
0
,
Name
:
"TestChannelQueue"
,
},
&
testData
{})
assert
.
NoError
(
t
,
err
)
...
...
This diff is collapsed.
Click to expand it.
modules/queue/workerpool.go
View file @
315d9286
...
...
@@ -96,8 +96,8 @@ func (p *WorkerPool) pushBoost(data Data) {
p
.
blockTimeout
/=
2
p
.
lock
.
Unlock
()
}()
p
.
addWorkers
(
ctx
,
boost
)
p
.
lock
.
Unlock
()
p
.
addWorkers
(
ctx
,
boost
)
p
.
dataChan
<-
data
}
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help