SwiftRingBuffer - RingBuffer aka Circular Queue

Related tags

GCD SwiftRingBuffer
Overview

Swift Ring Buffer

Ring Buffer aka Circular Queue This is an image

Ussage

var queue = CircularQueue<Int>(size: 2, startValue: 1)
queue.put(value: 2)
queue.put(value: 3)


var val = queue.get()
repeat {
    print(val ?? nil)
    val = queue.get()
} while(val != nil)

queue.put(value: 5)
repeat {
    print(val)
    val = queue.get()
} while(val != nil)

//output

Optional(3)
Optional(2)
Optional(1)
Optional(1)
nil
Optional(5)
You might also like...
iOS utility class to manage global dispatch queue.
iOS utility class to manage global dispatch queue.

YYDispatchQueuePool iOS utility class to manage global dispatch queue. (It's a component of YYKit) When use a concurrent queue to execute lots of bloc

Queue management system for AVSpeechSynthesizer

QHSpeechSynthesizerQueue Queue management system for AVSpeechSynthesizer Installation Cocoapods Add this to your Podfile: pod 'QHSpeechSynthesizerQueu

Dead-simple queue-oriented client for Spotify
Dead-simple queue-oriented client for Spotify

Spotiqueue A terribly simple macOS app for keyboard-based, queue-oriented Spotify use. Many years ago i built a version which relied on a now-deprecat

CCMQ is a message queue framework built for iOS

CCMQ CCMQ是基于MMAP开发的适用于iOS的消息队列框架 基本特性介绍 1.到达性和顺序性: CCMQ会确保消息一定能够发送到订阅者,CCMQ拥有串行和并行队列,串行队列会确保消息能够按照顺序发送顺序到达订阅者,并行队列则能够批量进行消息发送,但同一批次的消息到达顺序不能保证。 2.ACK机

A Task Queue Class developed in Swift (by Marin Todorov)
A Task Queue Class developed in Swift (by Marin Todorov)

TaskQueue Table of Contents Intro Installation CocoaPods Carthage Simple Examples Synchronous tasks Asynchronous tasks Serial and Concurrent Tasks GCD

Circular progress indicator for your macOS app
Circular progress indicator for your macOS app

CircularProgress Circular progress indicator for your macOS app This package is used in production by apps like Gifski and HEIC Converter. Requirement

A custom reusable circular / progress slider control for iOS application.
A custom reusable circular / progress slider control for iOS application.

HGCircularSlider Example To run the example project, clone the repo, and run pod install from the Example directory first. You also may like HGPlaceho

⭕️ CircleMenu is a simple, elegant UI menu with a circular layout and material design animations. Swift UI library made by @Ramotion
⭕️ CircleMenu is a simple, elegant UI menu with a circular layout and material design animations. Swift UI library made by @Ramotion

CIRCLE MENU Simple, elegant UI menu with a circular layout and material design animations We specialize in the designing and coding of custom UI for M

Menu with a circular layout based on Macaw
Menu with a circular layout based on Macaw

FanMenu Easily customizable floating circle menu created with Macaw We are a development agency building phenomenal apps. Usage Create UIView in your

A Circular SwiftUI progress View

A Circular progress view. There are some controllers to let you customize the progress-view and see which one works better for you. This whole project

Fully automatic managed circular image array above UIKit.
Fully automatic managed circular image array above UIKit.

Automatic Profile cluster view Fully automatic managed circular image array. Usage From Interface Builder • Drag ProfileClusterView.swift file into yo

Circular progress Animation
Circular progress Animation

JDCircularProgress JDCircularProgress is animateable UIView that can significantly enhance your users’ experiences and set your app apart from the res

A radial/circular menu featuring spring animations.
A radial/circular menu featuring spring animations.

ALRadialMenu A radial/circular menu featuring spring animations. Written in swift. Experimenting with fluent interfaces (https://github.com/vandadnp/s

Grid and Circular Menu for iOS.
Grid and Circular Menu for iOS.

IGCMenu IGCMenu library gives easy way to create Grid and Circular menu in app. This is light weight and highly customisable menu.Support iOS 7 and ab

PBCircularProgressView is a circular progress view for iOS similar to the app store download progress view.
PBCircularProgressView is a circular progress view for iOS similar to the app store download progress view.

Overview PBCircularProgressView is a circular progress view for iOS similar to the app store download progress view. It also ha

iOS Swift class to create circular or rounded avatar images
iOS Swift class to create circular or rounded avatar images

SwiftyAvatar iOS Swift 3.0 UIimage class Create awesome circular avatar images! IBInspectable attributes accessible from the identity inspector. Round

Swift image slideshow with circular scrolling, timer and full screen viewer
Swift image slideshow with circular scrolling, timer and full screen viewer

🖼 ImageSlideshow Customizable Swift image slideshow with circular scrolling, timer and full screen viewer 📱 Example To run the example project, clon

A simple and flexible way to add source of overlapping circular pictures, currently supports horizontal overlapping or distant pictures with great layout flexibility.
A simple and flexible way to add source of overlapping circular pictures, currently supports horizontal overlapping or distant pictures with great layout flexibility.

THIS PROJECT IS NO LONGER MAINTAINED. STILL ONE ONLY BEST UI SOLUTION FOR UIKIT DEVELOPERS. SOON WILL COME UP WITH SWIFTUI STILL CONTRIBUTORS ARE WELC

Circular progress view for Titanium
Circular progress view for Titanium

ti.circularprogress Circular progress view for Titanium. Using https://github.com/kaandedeoglu/KDCircularProgress (iOS) and https://github.com/owl-93/

Owner
null
CCMQ is a message queue framework built for iOS

CCMQ CCMQ是基于MMAP开发的适用于iOS的消息队列框架 基本特性介绍 1.到达性和顺序性: CCMQ会确保消息一定能够发送到订阅者,CCMQ拥有串行和并行队列,串行队列会确保消息能够按照顺序发送顺序到达订阅者,并行队列则能够批量进行消息发送,但同一批次的消息到达顺序不能保证。 2.ACK机

null 0 Dec 13, 2021
Taking a string containing a csv file and split it into records (aka lines) containing fields of data (aka Array of SubStrings)

Swift .csv parser Taking a string containing a csv file and split it into records (aka lines) containing fields of data (aka Array of SubStrings). Par

Matthias 0 Dec 29, 2021
Queuer is a queue manager, built on top of OperationQueue and Dispatch (aka GCD).

Queuer is a queue manager, built on top of OperationQueue and Dispatch (aka GCD). It allows you to create any asynchronous and synchronous task easily, all managed by a queue, with just a few lines.

Fabrizio Brancati 1k Dec 2, 2022
Interactive notification pop-over (aka "Toast) modeled after the iOS AirPods and Apple Pencil indicator.

Interactive notification pop-over (aka "Toast) modeled after the iOS AirPods and Apple Pencil indicator. Installation The recommended way is to use Co

Philip Kluz 108 Nov 11, 2022
Swift extension which adds start, animating and completion closures for CAAnimation objects. Aka, CAAnimation + Closure / Block

Swift-CAAnimation-Closure Swift extension which adds start, animating and completion closures for CAAnimation objects. Aka, CAAnimation + Closure or C

HongHao Zhang 112 Jun 17, 2022
ImageView - Component for loading and displaying different images aka SVG/PNG/JPG/JPEG

ImageView Component that loads and displays images(.svg/.png/.jpg/.jpeg) form as

Sergei 1 Mar 23, 2022
A real-time, votable, democratized music queue on iPad and iPhone using Spotify

Queue'd Music Queue'd is the best way to enjoy music with your friends. Add your favorite songs to a shared music queue at your favorite bars, restaur

Ryan Daulton 88 Dec 2, 2022
ClassicPhotos is a TableView App demos how to optimize image download and filter with operation queue.

ClassicPhotos ClassicPhotos is a TableView App demos how to optimize image download and filter with operation queue. With Operation and Operation Queu

Kushal Shingote 2 Dec 18, 2021
A protocol-centric, type and queue safe key-value workflow.

Light-weight, strict protocol-first styled PropertyKit helps you to easily and safely handle guaranteed values, keys or types on various situations of

gitmerge 12 Feb 26, 2021
A Generic Priority Queue in Pure Swift

SwiftPriorityQueue SwiftPriorityQueue is a pure Swift (no Cocoa) implementation of a generic priority queue data structure, appropriate for use on all

David Kopec 350 Dec 22, 2022