Skip to content

Commit

Permalink
Merge pull request #4 from boks1971/main
Browse files Browse the repository at this point in the history
Update dequeue to 1.0.0
  • Loading branch information
frostbyte73 authored Dec 19, 2024
2 parents 17ba301 + d75f5c8 commit fb79dfe
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module github.com/frostbyte73/core

go 1.19
go 1.22.1

require (
github.com/gammazero/deque v0.2.1
github.com/gammazero/deque v1.0.0
github.com/stretchr/testify v1.8.1
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/gammazero/deque v0.2.1 h1:qSdsbG6pgp6nL7A0+K/B7s12mcCY/5l5SIUpMOl+dC0=
github.com/gammazero/deque v0.2.1/go.mod h1:LFroj8x4cMYCukHJDbxFCkT+r9AndaJnFMuZDV34tuU=
github.com/gammazero/deque v1.0.0 h1:LTmimT8H7bXkkCy6gZX7zNLtkbz4NdS2z8LZuor3j34=
github.com/gammazero/deque v1.0.0/go.mod h1:iflpYvtGfM3U8S8j+sZEKIak3SAKYpA5/SQewgfXDKo=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
Expand Down
4 changes: 2 additions & 2 deletions pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ type worker struct {

active bool
next chan func()
deque *deque.Deque[func()]
deque deque.Deque[func()]
draining Fuse
done Fuse
kill Fuse
Expand All @@ -132,8 +132,8 @@ func NewQueueWorker(params QueueWorkerParams) QueueWorker {
w := &worker{
QueueWorkerParams: params,
next: make(chan func(), 1),
deque: deque.New[func()](params.QueueSize),
}
w.deque.SetBaseCap(params.QueueSize)
go w.run()
return w
}
Expand Down

0 comments on commit fb79dfe

Please sign in to comment.