Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add async.circularBuffer #703

Closed
pchiusano opened this issue Aug 5, 2016 · 1 comment
Closed

Add async.circularBuffer #703

pchiusano opened this issue Aug 5, 2016 · 1 comment
Assignees
Milestone

Comments

@pchiusano
Copy link
Contributor

Help wanted on this. This existed in 0.8, I believe @runarorama might have contributed it. I think a reasonable 0.9 signature for it would be:

def circularBuffer[F[_]:Async,A](capacity: Int): F[Queue[A]]

in async package. Behaves like a regular FIFO queue, but if an enqueue would make the queue size greater than capacity, do a dequeue first. Seems like it would be easy to implement in terms of a regular unbounded Queue plus a Semaphore.

@pchiusano pchiusano added this to the 0.9.0 milestone Aug 5, 2016
@mpilquist
Copy link
Member

If no one has started this, I'll add it sometime this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants