Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gostnops
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wei.xuan
gostnops
Commits
919d98af
Commit
919d98af
authored
Nov 14, 2020
by
wangwx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change the name of comments
parent
f17fd664
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
poolqueue.go
container/queue/poolqueue.go
+2
-1
No files found.
container/queue/poolqueue.go
View file @
919d98af
...
...
@@ -24,6 +24,7 @@ import (
"unsafe"
)
// SPMCLockFreeQ is a lock-free queue.
type
SPMCLockFreeQ
interface
{
PushHead
(
val
interface
{})
bool
PopHead
()
(
interface
{},
bool
)
...
...
@@ -205,7 +206,7 @@ func (d *poolDequeue) PopTail() (interface{}, bool) {
return
val
,
true
}
// NewSPMCLockFreeQ new a
poolDequeue
instance.
// NewSPMCLockFreeQ new a
SPMCLockFreeQ
instance.
func
NewSPMCLockFreeQ
(
n
int
)
(
SPMCLockFreeQ
,
error
)
{
if
n
&
(
n
-
1
)
!=
0
{
return
nil
,
errors
.
New
(
"the size of pool must be a power of 2"
)
...
...
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