Skip to content

Commit 94209e8

Browse files
authored
Merge pull request #4 from uber/opensource
Add open source documents
2 parents e9e188c + 49a6fad commit 94209e8

File tree

3 files changed

+113
-1
lines changed

3 files changed

+113
-1
lines changed

CONTRIBUTING.md

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Contributing to Swift-Concurrency
2+
3+
Uber welcomes contributions of all kinds and sizes. This includes everything from from simple bug reports to large features.
4+
5+
Before we can accept your contributions, we kindly ask you to sign our [Contributor License Agreement](https://cla-assistant.io/uber/RIBs).
6+
7+
Workflow
8+
--------
9+
10+
We love GitHub issues!
11+
12+
For small feature requests, an issue first proposing it for discussion or demo implementation in a PR suffice.
13+
14+
For big features, please open an issue so that we can agree on the direction, and hopefully avoid investing a lot of time on a feature that might need reworking.
15+
16+
Small pull requests for things like typos, bug fixes, etc are always welcome.
17+
18+
DOs and DON'Ts
19+
--------------
20+
21+
* DO follow our [coding style](https://github.com/raywenderlich/swift-style-guide)
22+
* DO include tests when adding new features. When fixing bugs, start with adding a test that highlights how the current behavior is broken.
23+
* DO keep the discussions focused. When a new or related topic comes up it's often better to create new issue than to side track the discussion.
24+
25+
* DON'T submit PRs that alter licensing related files or headers. If you believe there's a problem with them, file an issue and we'll be happy to discuss it.
26+
27+
Guiding Principles
28+
------------------
29+
30+
* We allow anyone to participate in our projects. Tasks can be carried out by anyone that demonstrates the capability to complete them
31+
* Always be respectful of one another. Assume the best in others and act with empathy at all times
32+
* Collaborate closely with individuals maintaining the project or experienced users. Getting ideas out in the open and seeing a proposal before it's a pull request helps reduce redundancy and ensures we're all connected to the decision making process

README.md

+71-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,19 @@
1-
# Swift Concurrency Utility Classes
1+
# Swift Concurrency
2+
3+
## Contents
4+
5+
- [Requirements](#requirements)
6+
- [Overview](#overview)
7+
- [Installation](#installation)
8+
- [Building](#building)
9+
- [Testing](#testing)
10+
11+
## Requirements
12+
13+
- Xcode 9.3+
14+
- Swift 4.0+
15+
16+
## Overview
217

318
A set of concurrency utility classes used by Uber. These are largely inspired by the equivalent [java.util.concurrent](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/package-summary.html) package classes.
419

@@ -13,3 +28,58 @@ Provides locking-free synchronization of a mutable object reference. It provides
1328

1429
### `CountDownLatch`
1530
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.
31+
32+
## Installation
33+
34+
### Carthage
35+
36+
[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with dylib frameworks.
37+
38+
You can install Carthage with [Homebrew](http://brew.sh/) using the following command:
39+
40+
```bash
41+
$ brew update
42+
$ brew install carthage
43+
```
44+
45+
To integrate Swift-Concurrency into your Xcode project using Carthage, specify it in your `Cartfile`:
46+
47+
```ogdl
48+
github "https://github.com/uber/swift-concurrency.git" ~> 0.2.0
49+
```
50+
51+
Run `carthage update` to build the framework and add the built `Concurrency.framework` into your Xcode project, by following the [instructions](https://github.com/Carthage/Carthage#adding-frameworks-to-an-application)
52+
53+
### Manually
54+
55+
If you prefer not to use Carthage, you can integrate Swift-Concurrency into your project manually, by adding the source files.
56+
57+
## Building
58+
59+
First fetch the dependencies:
60+
61+
```bash
62+
$ swift package fetch
63+
```
64+
65+
You can then build from the command-line:
66+
67+
```bash
68+
$ swift build
69+
```
70+
71+
Or create an Xcode project and build using the IDE:
72+
73+
```bash
74+
$ swift package generate-xcodeproj
75+
```
76+
77+
## Testing
78+
79+
From command-line.
80+
81+
```bash
82+
$ swift test
83+
```
84+
85+
Or you can follow the steps above to generate a Xcode project and run tests within Xcode.

travis.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
language: objective-c
2+
osx_image: xcode9
3+
4+
env:
5+
- ACTION=test PLATFORM=Mac DESTINATION='platform=OS X'
6+
- ACTION=test PLATFORM=iOS DESTINATION='platform=iOS Simulator,name=iPhone 7'
7+
- ACTION=test PLATFORM=tvOS DESTINATION='platform=tvOS Simulator,name=Apple TV 1080p'
8+
9+
script:
10+
- swift test

0 commit comments

Comments
 (0)