Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

git.sr.ht/~whereswaldon/latest

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

git.sr.ht/~whereswaldon/latest

  • v0.0.0-20210308171958-a201efcdbede
  • Go
  • Socket score

Version published
Created
Source

latest

A go package for channel types that attempt to always use the latest available value.

The fundamental primitive provided by this package is a channel with a special property: sending never blocks. Receiving still has the normal channel blocking semantics. This is achieved by violating the queue-like behavior of normal channels. Instead of data queuing up when sent, data sent later will replace data that is pending delivery. This isn't desired or useful for all applications, but sometimes it's just what you need.

The above is implemented in latest.Chan.

This package also provides a latest.Worker that sends and recieves on two latest.Chan instances and has a goroutine processing data on the other end. This can be useful for building data processing in which the only data whose results matter is the latest request.

License

Dual MIT/Unlicense

Contribute

Send questions, comments, and patches to my public inbox.

FAQs

Package last updated on 08 Mar 2021

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc