Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
3ef8ab4d
Commit
3ef8ab4d
authored
Nov 29, 2017
by
Cao Shufeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Heap is not thread safe in scheduling queue
parent
8226973a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
3 deletions
+1
-3
scheduling_queue.go
plugin/pkg/scheduler/core/scheduling_queue.go
+1
-3
No files found.
plugin/pkg/scheduler/core/scheduling_queue.go
View file @
3ef8ab4d
...
...
@@ -149,8 +149,6 @@ type UnschedulablePods interface {
// scheduling. This is called activeQ and is a Heap. Another queue holds
// pods that are already tried and are determined to be unschedulable. The latter
// is called unschedulableQ.
// Heap is already thread safe, but we need to acquire another lock here to ensure
// atomicity of operations on the two data structures..
type
PriorityQueue
struct
{
lock
sync
.
RWMutex
cond
sync
.
Cond
...
...
@@ -611,7 +609,7 @@ func (h *heapData) Pop() interface{} {
return
item
.
obj
}
// Heap is a
thread-safe
producer/consumer queue that implements a heap data structure.
// Heap is a producer/consumer queue that implements a heap data structure.
// It can be used to implement priority queues and similar data structures.
type
Heap
struct
{
// data stores objects and has a queue that keeps their ordering according
...
...
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