[prev in list] [next in list] [prev in thread] [next in thread] 

List:       haskell-cafe
Subject:    [Haskell-cafe] Queue which tracks actual in-memory element size?
From:       Bardur Arantsson <spam () scientician ! net>
Date:       2017-03-29 5:39:11
Message-ID: obfh9p$7hq$1 () blaine ! gmane ! org
[Download RAW message or body]

Hi all,

So we have the TBQueue[1] which tracks the number of elements, but does
anyone know if there's an equivalent queue which the actual combined
size of the elements? (I'd be quite happy if it used "gsize" or similar,
but I suppose the ideal would be if I could supply a "size estimator"
function.)

It seems like an obvious generalization of TBQueue[2], but my Google-fu
is letting me down at the moment.

Regards,

---
[1]
https://hackage.haskell.org/package/stm-2.4.4.1/docs/Control-Concurrent-STM-TBQueue.html

[2] TBQueue would be the equivalent of estimating every element to have
size 1.

_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic