All Projects → uber → Swift Concurrency

uber / Swift Concurrency

Licence: apache-2.0
Concurrency utilities for Swift

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Swift Concurrency

Cocoaasyncsocket demo
基于AsyncSocket搭建即时通讯体系 . 包含TCP连接 , 消息发送 , 消息接收 , 心跳处理 ,断网重连 , 消息超时 , 消息分发 , 数据库结构设计 , 消息丢失等 . 以及UI设计, 文本表情消息/语音消息/图片消息/视频消息/文件消息/撤回消息/提示语消息的实现思路讲解
Stars: ✭ 981 (+290.84%)
Mutual labels:  ios-lib
Calendarkit
📅 Calendar for Apple platforms in Swift
Stars: ✭ 2,049 (+716.33%)
Mutual labels:  ios-lib
Uigradient
A simple and powerful library for using gradient layer, image, color
Stars: ✭ 208 (-17.13%)
Mutual labels:  ios-lib
Ios Arkit
iOS Location based Augmented Reality engine
Stars: ✭ 88 (-64.94%)
Mutual labels:  ios-lib
Nvactivityindicatorview
A collection of awesome loading animations
Stars: ✭ 10,031 (+3896.41%)
Mutual labels:  ios-lib
Ios Multiselectiontable
Beautiful way of having a multi-selection table on iOS written in Swift
Stars: ✭ 156 (-37.85%)
Mutual labels:  ios-lib
Cardviewlist
An elegant and responsive CardView like Android on iOS with Swift. Available horizontal and vertical scrolling with full animations and customizable.
Stars: ✭ 30 (-88.05%)
Mutual labels:  ios-lib
Titled navigation bar
A beautiful and simple bottom navigation bar with smooth animation when switching selected item.
Stars: ✭ 232 (-7.57%)
Mutual labels:  ios-lib
Pinlayout
Fast Swift Views layouting without auto layout. No magic, pure code, full control and blazing fast. Concise syntax, intuitive, readable & chainable. [iOS/macOS/tvOS/CALayer]
Stars: ✭ 1,870 (+645.02%)
Mutual labels:  ios-lib
Mycoretextlabel
图文混排 , 实现图片文字混排 , 可显示常规链接比如网址,@,#话题#,手机号 , 邮箱号等 , 可以自定义链接字,设置关键字高亮等功能 . 适用于微博,微信,IM聊天对话等场景 . 实现这些功能仅用了几百行代码,耦合性也较低
Stars: ✭ 192 (-23.51%)
Mutual labels:  ios-lib
Shapeview
A customized shape view with shadow and transparent background supported.
Stars: ✭ 90 (-64.14%)
Mutual labels:  ios-lib
Swiftcocoadsl
An easy way to write iOS UI
Stars: ✭ 103 (-58.96%)
Mutual labels:  ios-lib
Lgbutton
A fully customisable subclass of the native UIControl which allows you to create beautiful buttons without writing any line of code.
Stars: ✭ 2,216 (+782.87%)
Mutual labels:  ios-lib
Highlightr
iOS & OSX Syntax Highlighter.
Stars: ✭ 1,116 (+344.62%)
Mutual labels:  ios-lib
Core Layout
Flexbox & CSS-style Layout in Swift.
Stars: ✭ 215 (-14.34%)
Mutual labels:  ios-lib
Xmnetworking
A lightweight but powerful network library with simplified and expressive syntax based on AFNetworking.
Stars: ✭ 980 (+290.44%)
Mutual labels:  ios-lib
Metalnanovg
The Metal port of NanoVG.
Stars: ✭ 151 (-39.84%)
Mutual labels:  ios-lib
Rhplaceholder
Show pleasant loading view for your users 😍
Stars: ✭ 238 (-5.18%)
Mutual labels:  ios-lib
Pvview
A small library that helps you to make an amazing parallax view
Stars: ✭ 227 (-9.56%)
Mutual labels:  ios-lib
Lmmediaplayer
A video and audio player with replaceable UI component.
Stars: ✭ 183 (-27.09%)
Mutual labels:  ios-lib

Swift Concurrency

Build Status Carthage compatible License

Contents

Requirements

  • Xcode 9.3+
  • Swift 4.0+

Overview

A set of concurrency utility classes used by Uber. These are largely inspired by the equivalent java.util.concurrent package classes.

AtomicBool

Provides locking-free synchronization of a mutable Bool. It provides higher performance than using locks to ensure thread-safety and synchronization correctness.

AtomicInt

Provides locking-free synchronization of a mutable Int. It provides higher performance than using locks to ensure thread-safety and synchronization correctness.

AtomicReference

Provides locking-free synchronization of a mutable object reference. It provides higher performance than using locks to ensure thread-safety and synchronization correctness.

CountDownLatch

A utility class that allows coordination between threads. A count down latch starts with an initial count. Threads can then decrement the count until it reaches zero, at which point, the suspended waiting thread shall proceed. A CountDownLatch behaves differently from a DispatchSemaphore once the latch is open. Unlike a semaphore where subsequent waits would still block the caller thread, once a CountDownLatch is open, all subsequent waits can directly passthrough.

ConcurrentSequenceExecutor

An execution utility that executes sequences of tasks and returns the final result in a highly concurrent environment.

SerialSequenceExecutor

A debugging executor that executes sequences of tasks and returns the final result serially on the caller thread.

Installation

Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with dylib frameworks.

You can install Carthage with Homebrew using the following command:

$ brew update
$ brew install carthage

To integrate Swift-Concurrency into your Xcode project using Carthage, specify it in your Cartfile:

github "https://github.com/uber/swift-concurrency.git" ~> 0.4.0

Run carthage update to build the framework and add the built Concurrency.framework into your Xcode project, by following the instructions

Manually

If you prefer not to use Carthage, you can integrate Swift-Concurrency into your project manually, by adding the source files.

Building

First fetch the dependencies:

$ swift package fetch

You can then build from the command-line:

$ swift build

Or create an Xcode project and build using the IDE:

$ swift package generate-xcodeproj

Testing

From command-line.

$ swift test

Or you can follow the steps above to generate a Xcode project and run tests within Xcode.

Related projects

If you like Needle, check out other related open source projects from our team:

  • Needle: a compile-time safe Swift dependency injection framework.
  • Swift Abstract Class: a light-weight library along with an executable that enables compile-time safe abstract class development for Swift projects.
  • Swift Common: common libraries used by this set of Swift open source projects.

License

FOSSA Status

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].