Skip to content

Add optional capacity to queue#74

Draft
polytypic wants to merge 1 commit into
mainfrom
add-optional-capacity-to-queue
Draft

Add optional capacity to queue#74
polytypic wants to merge 1 commit into
mainfrom
add-optional-capacity-to-queue

Conversation

@polytypic

@polytypic polytypic commented May 20, 2023

Copy link
Copy Markdown
Collaborator

This PR adds optional capacity argument to Queue.create and Stack.create allowing one to create a bounded queue/stack.

TODO:

  • Add capacity to stack.
  • Allow setting the capacity.
    • If capacity is less than length then new elements cannot be added to the queue/stack.
    • Capacity can be set to 0 to effectively "close" the queue/stack.
  • Test operations with capacity <> Int.max_int

@polytypic polytypic force-pushed the add-optional-capacity-to-queue branch 17 times, most recently from a233cee to ac5ec6e Compare May 26, 2023 15:37
@polytypic polytypic force-pushed the add-optional-capacity-to-queue branch 2 times, most recently from 0055649 to 6c207bb Compare May 31, 2023 21:22
@polytypic polytypic force-pushed the add-optional-capacity-to-queue branch 4 times, most recently from 9b8e8ac to f63348f Compare June 11, 2023 06:58
@polytypic polytypic force-pushed the add-optional-capacity-to-queue branch 3 times, most recently from dd93e95 to 27e78c0 Compare June 13, 2023 12:45
@polytypic polytypic force-pushed the add-optional-capacity-to-queue branch 4 times, most recently from b204e29 to aa7c190 Compare June 28, 2023 07:25
@polytypic polytypic force-pushed the add-optional-capacity-to-queue branch 14 times, most recently from 9f65c01 to 35a87f8 Compare December 10, 2023 15:20
@polytypic polytypic force-pushed the add-optional-capacity-to-queue branch from 35a87f8 to 1964d7c Compare December 18, 2023 17:40
@polytypic polytypic force-pushed the add-optional-capacity-to-queue branch 7 times, most recently from 9a5c521 to cf67c18 Compare December 26, 2023 11:13
@polytypic polytypic force-pushed the add-optional-capacity-to-queue branch 5 times, most recently from 2e1ed89 to a2cbeca Compare December 31, 2023 12:51
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

Successfully merging this pull request may close these issues.

1 participant