Skip to content

Support size for TBQueue #61

@epoberezkin

Description

@epoberezkin

Currently it is not possible to determine TBQueue capacity, it has to be stored outside.

Can we add sizeTBQueue to return the max number of the elements that it can hold?

The implementation is trivial, given that it is fixed it doesn't even need to be in STM monad unless I am missing something:

sizeTBQueue :: TBQueue a -> Natural
sizeTBQueue (TBQueue _ _ _ _ size) = size

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions