Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lurado/ldocappedqueue
A queue that doesn't grow indefinitely.
https://github.com/lurado/ldocappedqueue
data-structures ios macos objective-c
Last synced: 4 days ago
JSON representation
A queue that doesn't grow indefinitely.
- Host: GitHub
- URL: https://github.com/lurado/ldocappedqueue
- Owner: lurado
- License: mit
- Created: 2016-10-18T20:55:32.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2016-10-24T12:02:07.000Z (about 8 years ago)
- Last Synced: 2024-12-12T11:47:22.591Z (about 1 month ago)
- Topics: data-structures, ios, macos, objective-c
- Language: Shell
- Size: 43.9 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LDOCappedQueue
A queue that only holds a maximum number of items and discards the least recently added ones, if new ones are added and the capacity is reached.
It's a relatively thin wrapper around `NSMutableArray`, which is implemented as a circular buffer [according to this blog post by Bartosz Ciechanowski](http://ciechanowski.me/blog/2014/03/05/exposing-nsmutablearray/)). Therefore enqueueing and dequeueing are O(1) operations.
The implementation is not thread safe.
## Installation
LDOCappedQueue is available through [CocoaPods](https://cocoapods.org). To install
it, simply add the following line to your Podfile:```ruby
pod "LDOCappedQueue"
```## Author
Julian Raschke und Sebastian Ludwig GbR, https://www.lurado.com
## License
LDOCappedQueue is available under the MIT license. See the LICENSE file for more info.