jberryman / unagi-chan

A haskell library implementing fast and scalable concurrent queues for x86, with a Chan-like API
BSD 3-Clause "New" or "Revised" License
127 stars 15 forks source link

bounded blocking? #7

Closed mwotton closed 10 years ago

mwotton commented 10 years ago

I typically use chans for backpressure, so it's important to me to be able to say "the queue can have at most 1000 elements, and subsequent writes block". Any way to build that behaviour out of unagi-chan?

jberryman commented 10 years ago

Thanks for your interest, mwotten. I'd like to use https://github.com/jberryman/unagi-chan/issues/1 for all bounded queue-related discussion. Would you mind commenting there with:

  1. A bit more detail about what you mean by "backpressure" and maybe describing a specific use-case.
  2. What might be a typical size, and a reasonable maximum size you'd need for the bounded queue (e.g. 100 elements)

Thanks again, and I'll respond to you in that other thread.