Skip to content

Commit 262d526

Browse files
committed
Remove concurrency from readme
1 parent af1a79c commit 262d526

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

README.md

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -227,29 +227,6 @@ let left = divideLeftMultiplyRight.apply(Either.left(4)) // 2
227227
let right = divideLeftMultiplyRight.apply(Either.right(7)) // 14
228228
```
229229

230-
**Concurrency**
231-
232-
```swift
233-
import class Swiftz.Chan
234-
235-
//: A Channel is an unbounded FIFO stream of values with special semantics
236-
//: for reads and writes.
237-
let chan : Chan<Int> = Chan()
238-
239-
//: All writes to the Channel always succeed. The Channel now contains `1`.
240-
chan.write(1) // happens immediately
241-
242-
//: Reads to non-empty Channels occur immediately. The Channel is now empty.
243-
let x1 = chan.read()
244-
245-
//: But if we read from an empty Channel the read blocks until we write to the Channel again.
246-
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 1 * Double(NSEC_PER_SEC)), dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), {
247-
chan.write(2) // Causes the read to suceed and unblocks the reading thread.
248-
})
249-
250-
let x2 = chan.read() // Blocks until the dispatch block is executed and the Channel becomes non-empty.
251-
```
252-
253230
Operators
254231
---------
255232

0 commit comments

Comments
 (0)