
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
github.com/anisus/queue
PACKAGE
package queue import "github.com\anisus\queue"
Package queue implements a non-blocking concurrent first-in-first-out queue algorithm
as described in the paper:
Simple, Fast, and Practical Non-Blocking and Blocking
Concurrent Queue Algorithms \Lambda
Maged M. Michael Michael L. Scott
Department of Computer Science
University of Rochester
Rochester, NY 14627-0226
fmichael,scottg@cs.rochester.edu
http://www.cs.rochester.edu/u/scott/papers/1996_PODC_queues.pdf
The original paper uses a counter and a CAS2 instruction to
avoid the ABA problem. Since CAS2 instructions is not available in Go,
the package uses a hack similar to that used in Microsoft Invisible Computing:
http://research.microsoft.com/en-us/um/redmond/projects/invisible/src/queue/queue.c.htm
TYPES
type Queue struct { // contains filtered or unexported fields }
func New() *Queue New returns an initialized queue
func (q *Queue) Dequeue() (value interface{}, ok bool) Dequeue returns the value at the head of the queue and true, or if the queue is empty, it returns a nil value and false
func (q *Queue) Enqueue(value interface{}) Enqueue inserts the value at the tail of the queue
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.