Skip to content

Limiting size of internal queue #7

New issue

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

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

Already on GitHub? # to your account

Closed
felixSchl opened this issue Sep 26, 2017 · 5 comments
Closed

Limiting size of internal queue #7

felixSchl opened this issue Sep 26, 2017 · 5 comments

Comments

@felixSchl
Copy link

felixSchl commented Sep 26, 2017

I am porting pipes-concurrency to purescript and am looking for a suitable way to implement the buffering of values.

I need to implement:

data Buffer a
  = Unbounded   -- this is what AVar currently does
  | Bounded Int -- ?
  | Latest a    -- ?
  | Newest Int  -- ?

Do you think this project is the right candidate to implement Newest Int and Bounded Int on top of?

@natefaubion
Copy link
Contributor

I think ideally these sorts of things would be built on top of avar as a separate library.

@natefaubion
Copy link
Contributor

Or I should say, while avar does have an internal queue, it is not a general purpose queue, but it can be used to implement concurrent queues like what you want.

@jdegoes
Copy link

jdegoes commented Oct 2, 2017

Agreed these should be built on top of AVar (and TVar when we have it). In Haskell, there are a number of queues built on top of MVar (which is their equivalent of AVar), so it should be straightforward to port.

@safareli
Copy link

I think this could be closed by as there is https://github.com/slamdata/purescript-concurrent-queues

@cryogenian
Copy link
Member

Right

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Development

No branches or pull requests

5 participants