Skip to content

Commit 00b000c

Browse files
committed
Merge pull request #192 from CodaFi/amdahls-law
Amdahls Law
2 parents 9a1425b + 262d526 commit 00b000c

File tree

12 files changed

+19
-187
lines changed

12 files changed

+19
-187
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

Swiftz-iOS.xcodeproj/project.pbxproj

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -67,17 +67,13 @@
6767
84A88F2D1A70C77B003D53CF /* Tuple.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A88DE11A70C2B5003D53CF /* Tuple.swift */; };
6868
84A88F2E1A70C77B003D53CF /* TupleExt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A88DE21A70C2B5003D53CF /* TupleExt.swift */; };
6969
84A88F671A70C7A0003D53CF /* ArrayExtSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A88ECC1A70C707003D53CF /* ArrayExtSpec.swift */; };
70-
84A88F681A70C7A0003D53CF /* ChanSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A88ECD1A70C707003D53CF /* ChanSpec.swift */; };
71-
84A88F691A70C7A0003D53CF /* ConcurrentTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A88ECE1A70C707003D53CF /* ConcurrentTests.swift */; };
7270
84A88F6A1A70C7A0003D53CF /* EitherSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A88ECF1A70C707003D53CF /* EitherSpec.swift */; };
7371
84A88F6B1A70C7A0003D53CF /* FunctorSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A88ED01A70C707003D53CF /* FunctorSpec.swift */; };
74-
84A88F6C1A70C7A0003D53CF /* FutureSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A88ED11A70C707003D53CF /* FutureSpec.swift */; };
7572
84A88F6D1A70C7A0003D53CF /* HListSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A88ED21A70C707003D53CF /* HListSpec.swift */; };
7673
84A88F6E1A70C7A0003D53CF /* JSONSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A88ED31A70C707003D53CF /* JSONSpec.swift */; };
7774
84A88F6F1A70C7A0003D53CF /* ListSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A88ED41A70C707003D53CF /* ListSpec.swift */; };
7875
84A88F701A70C7A0003D53CF /* MaybeSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A88ED51A70C707003D53CF /* MaybeSpec.swift */; };
7976
84A88F711A70C7A0003D53CF /* MonoidSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A88ED61A70C707003D53CF /* MonoidSpec.swift */; };
80-
84A88F721A70C7A0003D53CF /* MVarSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A88ED71A70C707003D53CF /* MVarSpec.swift */; };
8177
84A88F731A70C7A0003D53CF /* OptionalExtSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A88ED81A70C707003D53CF /* OptionalExtSpec.swift */; };
8278
84A88F741A70C7A0003D53CF /* PartyExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A88ED91A70C707003D53CF /* PartyExample.swift */; };
8379
84A88F751A70C7A0003D53CF /* ResultSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A88EDA1A70C707003D53CF /* ResultSpec.swift */; };
@@ -198,17 +194,13 @@
198194
84A88E951A70C649003D53CF /* Optional.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Optional.swift; path = ../Carthage/Checkouts/Swiftx/Swiftx/Optional.swift; sourceTree = "<group>"; };
199195
84A88E961A70C649003D53CF /* Result.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Result.swift; path = ../Carthage/Checkouts/Swiftx/Swiftx/Result.swift; sourceTree = "<group>"; };
200196
84A88ECC1A70C707003D53CF /* ArrayExtSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ArrayExtSpec.swift; path = SwiftzTests/ArrayExtSpec.swift; sourceTree = SOURCE_ROOT; };
201-
84A88ECD1A70C707003D53CF /* ChanSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ChanSpec.swift; path = SwiftzTests/ChanSpec.swift; sourceTree = SOURCE_ROOT; };
202-
84A88ECE1A70C707003D53CF /* ConcurrentTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ConcurrentTests.swift; path = SwiftzTests/ConcurrentTests.swift; sourceTree = SOURCE_ROOT; };
203197
84A88ECF1A70C707003D53CF /* EitherSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = EitherSpec.swift; path = SwiftzTests/EitherSpec.swift; sourceTree = SOURCE_ROOT; };
204198
84A88ED01A70C707003D53CF /* FunctorSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = FunctorSpec.swift; path = SwiftzTests/FunctorSpec.swift; sourceTree = SOURCE_ROOT; };
205-
84A88ED11A70C707003D53CF /* FutureSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = FutureSpec.swift; path = SwiftzTests/FutureSpec.swift; sourceTree = SOURCE_ROOT; };
206199
84A88ED21A70C707003D53CF /* HListSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = HListSpec.swift; path = SwiftzTests/HListSpec.swift; sourceTree = SOURCE_ROOT; };
207200
84A88ED31A70C707003D53CF /* JSONSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JSONSpec.swift; path = SwiftzTests/JSONSpec.swift; sourceTree = SOURCE_ROOT; };
208201
84A88ED41A70C707003D53CF /* ListSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ListSpec.swift; path = SwiftzTests/ListSpec.swift; sourceTree = SOURCE_ROOT; };
209202
84A88ED51A70C707003D53CF /* MaybeSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = MaybeSpec.swift; path = SwiftzTests/MaybeSpec.swift; sourceTree = SOURCE_ROOT; };
210203
84A88ED61A70C707003D53CF /* MonoidSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = MonoidSpec.swift; path = SwiftzTests/MonoidSpec.swift; sourceTree = SOURCE_ROOT; };
211-
84A88ED71A70C707003D53CF /* MVarSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = MVarSpec.swift; path = SwiftzTests/MVarSpec.swift; sourceTree = SOURCE_ROOT; };
212204
84A88ED81A70C707003D53CF /* OptionalExtSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = OptionalExtSpec.swift; path = SwiftzTests/OptionalExtSpec.swift; sourceTree = SOURCE_ROOT; };
213205
84A88ED91A70C707003D53CF /* PartyExample.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = PartyExample.swift; path = SwiftzTests/PartyExample.swift; sourceTree = SOURCE_ROOT; };
214206
84A88EDA1A70C707003D53CF /* ResultSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ResultSpec.swift; path = SwiftzTests/ResultSpec.swift; sourceTree = SOURCE_ROOT; };
@@ -273,7 +265,6 @@
273265
isa = PBXGroup;
274266
children = (
275267
84A88F871A70C953003D53CF /* Examples */,
276-
84A88F881A70C967003D53CF /* Concurrent */,
277268
84A88F8A1A70C982003D53CF /* Data */,
278269
84A88F891A70C97C003D53CF /* Ext */,
279270
84A88D611A70C23D003D53CF /* Supporting Files */,
@@ -412,17 +403,6 @@
412403
name = Examples;
413404
sourceTree = "<group>";
414405
};
415-
84A88F881A70C967003D53CF /* Concurrent */ = {
416-
isa = PBXGroup;
417-
children = (
418-
84A88ECD1A70C707003D53CF /* ChanSpec.swift */,
419-
84A88ECE1A70C707003D53CF /* ConcurrentTests.swift */,
420-
84A88ED11A70C707003D53CF /* FutureSpec.swift */,
421-
84A88ED71A70C707003D53CF /* MVarSpec.swift */,
422-
);
423-
name = Concurrent;
424-
sourceTree = "<group>";
425-
};
426406
84A88F891A70C97C003D53CF /* Ext */ = {
427407
isa = PBXGroup;
428408
children = (
@@ -584,18 +564,14 @@
584564
buildActionMask = 2147483647;
585565
files = (
586566
84A88F671A70C7A0003D53CF /* ArrayExtSpec.swift in Sources */,
587-
84A88F681A70C7A0003D53CF /* ChanSpec.swift in Sources */,
588-
84A88F691A70C7A0003D53CF /* ConcurrentTests.swift in Sources */,
589567
84A88F6A1A70C7A0003D53CF /* EitherSpec.swift in Sources */,
590568
84A88F6B1A70C7A0003D53CF /* FunctorSpec.swift in Sources */,
591-
84A88F6C1A70C7A0003D53CF /* FutureSpec.swift in Sources */,
592569
84BB57671AA12E4300214BC5 /* StateSpec.swift in Sources */,
593570
84A88F6D1A70C7A0003D53CF /* HListSpec.swift in Sources */,
594571
84A88F6E1A70C7A0003D53CF /* JSONSpec.swift in Sources */,
595572
84A88F6F1A70C7A0003D53CF /* ListSpec.swift in Sources */,
596573
84A88F701A70C7A0003D53CF /* MaybeSpec.swift in Sources */,
597574
84A88F711A70C7A0003D53CF /* MonoidSpec.swift in Sources */,
598-
84A88F721A70C7A0003D53CF /* MVarSpec.swift in Sources */,
599575
84A88F731A70C7A0003D53CF /* OptionalExtSpec.swift in Sources */,
600576
84A88F741A70C7A0003D53CF /* PartyExample.swift in Sources */,
601577
84A88F751A70C7A0003D53CF /* ResultSpec.swift in Sources */,

Swiftz.xcodeproj/project.pbxproj

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,13 @@
1414
84A88F9E1A71DF7F003D53CF /* Swiftz.h in Headers */ = {isa = PBXBuildFile; fileRef = 84A88F9D1A71DF7F003D53CF /* Swiftz.h */; settings = {ATTRIBUTES = (Public, ); }; };
1515
84A88FA41A71DF7F003D53CF /* Swiftz.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84A88F981A71DF7F003D53CF /* Swiftz.framework */; };
1616
84A88FC91A71DFA0003D53CF /* ArrayExtSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A88FB41A71DFA0003D53CF /* ArrayExtSpec.swift */; };
17-
84A88FCA1A71DFA0003D53CF /* ChanSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A88FB51A71DFA0003D53CF /* ChanSpec.swift */; };
18-
84A88FCB1A71DFA0003D53CF /* ConcurrentTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A88FB61A71DFA0003D53CF /* ConcurrentTests.swift */; };
1917
84A88FCC1A71DFA0003D53CF /* EitherSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A88FB71A71DFA0003D53CF /* EitherSpec.swift */; };
2018
84A88FCD1A71DFA0003D53CF /* FunctorSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A88FB81A71DFA0003D53CF /* FunctorSpec.swift */; };
21-
84A88FCE1A71DFA0003D53CF /* FutureSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A88FB91A71DFA0003D53CF /* FutureSpec.swift */; };
2219
84A88FCF1A71DFA0003D53CF /* HListSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A88FBA1A71DFA0003D53CF /* HListSpec.swift */; };
2320
84A88FD01A71DFA0003D53CF /* JSONSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A88FBB1A71DFA0003D53CF /* JSONSpec.swift */; };
2421
84A88FD11A71DFA0003D53CF /* ListSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A88FBC1A71DFA0003D53CF /* ListSpec.swift */; };
2522
84A88FD21A71DFA0003D53CF /* MaybeSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A88FBD1A71DFA0003D53CF /* MaybeSpec.swift */; };
2623
84A88FD31A71DFA0003D53CF /* MonoidSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A88FBE1A71DFA0003D53CF /* MonoidSpec.swift */; };
27-
84A88FD41A71DFA0003D53CF /* MVarSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A88FBF1A71DFA0003D53CF /* MVarSpec.swift */; };
2824
84A88FD51A71DFA0003D53CF /* OptionalExtSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A88FC01A71DFA0003D53CF /* OptionalExtSpec.swift */; };
2925
84A88FD61A71DFA0003D53CF /* PartyExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A88FC11A71DFA0003D53CF /* PartyExample.swift */; };
3026
84A88FD71A71DFA0003D53CF /* ResultSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A88FC21A71DFA0003D53CF /* ResultSpec.swift */; };
@@ -145,17 +141,13 @@
145141
84A88FA31A71DF7F003D53CF /* SwiftzTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SwiftzTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
146142
84A88FA91A71DF7F003D53CF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
147143
84A88FB41A71DFA0003D53CF /* ArrayExtSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ArrayExtSpec.swift; sourceTree = "<group>"; usesTabs = 1; };
148-
84A88FB51A71DFA0003D53CF /* ChanSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChanSpec.swift; sourceTree = "<group>"; usesTabs = 1; };
149-
84A88FB61A71DFA0003D53CF /* ConcurrentTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConcurrentTests.swift; sourceTree = "<group>"; usesTabs = 1; };
150144
84A88FB71A71DFA0003D53CF /* EitherSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EitherSpec.swift; sourceTree = "<group>"; usesTabs = 1; };
151145
84A88FB81A71DFA0003D53CF /* FunctorSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FunctorSpec.swift; sourceTree = "<group>"; usesTabs = 1; };
152-
84A88FB91A71DFA0003D53CF /* FutureSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FutureSpec.swift; sourceTree = "<group>"; usesTabs = 1; };
153146
84A88FBA1A71DFA0003D53CF /* HListSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HListSpec.swift; sourceTree = "<group>"; usesTabs = 1; };
154147
84A88FBB1A71DFA0003D53CF /* JSONSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = JSONSpec.swift; sourceTree = "<group>"; usesTabs = 1; };
155148
84A88FBC1A71DFA0003D53CF /* ListSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ListSpec.swift; sourceTree = "<group>"; usesTabs = 1; };
156149
84A88FBD1A71DFA0003D53CF /* MaybeSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MaybeSpec.swift; sourceTree = "<group>"; usesTabs = 1; };
157150
84A88FBE1A71DFA0003D53CF /* MonoidSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MonoidSpec.swift; sourceTree = "<group>"; usesTabs = 1; };
158-
84A88FBF1A71DFA0003D53CF /* MVarSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MVarSpec.swift; sourceTree = "<group>"; usesTabs = 1; };
159151
84A88FC01A71DFA0003D53CF /* OptionalExtSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OptionalExtSpec.swift; sourceTree = "<group>"; usesTabs = 1; };
160152
84A88FC11A71DFA0003D53CF /* PartyExample.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PartyExample.swift; sourceTree = "<group>"; usesTabs = 1; };
161153
84A88FC21A71DFA0003D53CF /* ResultSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ResultSpec.swift; sourceTree = "<group>"; usesTabs = 1; };
@@ -297,7 +289,6 @@
297289
isa = PBXGroup;
298290
children = (
299291
84A890591A71E1D7003D53CF /* Examples */,
300-
84A890581A71E1C5003D53CF /* Concurrent */,
301292
84A8905A1A71E1EE003D53CF /* Data */,
302293
84A890571A71E1B5003D53CF /* Ext */,
303294
84A88FA81A71DF7F003D53CF /* Supporting Files */,
@@ -415,17 +406,6 @@
415406
name = Ext;
416407
sourceTree = "<group>";
417408
};
418-
84A890581A71E1C5003D53CF /* Concurrent */ = {
419-
isa = PBXGroup;
420-
children = (
421-
84A88FB51A71DFA0003D53CF /* ChanSpec.swift */,
422-
84A88FB61A71DFA0003D53CF /* ConcurrentTests.swift */,
423-
84A88FB91A71DFA0003D53CF /* FutureSpec.swift */,
424-
84A88FBF1A71DFA0003D53CF /* MVarSpec.swift */,
425-
);
426-
name = Concurrent;
427-
sourceTree = "<group>";
428-
};
429409
84A890591A71E1D7003D53CF /* Examples */ = {
430410
isa = PBXGroup;
431411
children = (
@@ -649,26 +629,22 @@
649629
isa = PBXSourcesBuildPhase;
650630
buildActionMask = 2147483647;
651631
files = (
652-
84A88FCA1A71DFA0003D53CF /* ChanSpec.swift in Sources */,
653632
84A88FD21A71DFA0003D53CF /* MaybeSpec.swift in Sources */,
654633
84A88FD91A71DFA0003D53CF /* ShapeExample.swift in Sources */,
655634
84A88FDC1A71DFA0003D53CF /* TupleExtSpec.swift in Sources */,
656-
84A88FCB1A71DFA0003D53CF /* ConcurrentTests.swift in Sources */,
657635
84A88FD61A71DFA0003D53CF /* PartyExample.swift in Sources */,
658636
84BB57641AA12D2200214BC5 /* StateSpec.swift in Sources */,
659637
84A88FCF1A71DFA0003D53CF /* HListSpec.swift in Sources */,
660638
84A88FDB1A71DFA0003D53CF /* ThoseSpec.swift in Sources */,
661639
84A88FDD1A71DFA0003D53CF /* UserExample.swift in Sources */,
662640
84A88FC91A71DFA0003D53CF /* ArrayExtSpec.swift in Sources */,
663-
84A88FCE1A71DFA0003D53CF /* FutureSpec.swift in Sources */,
664641
84A88FD51A71DFA0003D53CF /* OptionalExtSpec.swift in Sources */,
665642
84A88FCD1A71DFA0003D53CF /* FunctorSpec.swift in Sources */,
666643
84A88FD11A71DFA0003D53CF /* ListSpec.swift in Sources */,
667644
84A88FD01A71DFA0003D53CF /* JSONSpec.swift in Sources */,
668645
84A88FD71A71DFA0003D53CF /* ResultSpec.swift in Sources */,
669646
84A88FD31A71DFA0003D53CF /* MonoidSpec.swift in Sources */,
670647
84A88FDA1A71DFA0003D53CF /* StringExtSpec.swift in Sources */,
671-
84A88FD41A71DFA0003D53CF /* MVarSpec.swift in Sources */,
672648
84A88FCC1A71DFA0003D53CF /* EitherSpec.swift in Sources */,
673649
);
674650
runOnlyForDeploymentPostprocessing = 0;

Swiftz/Chan.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ public final class Chan<A> {
1818
let cond : UnsafeMutablePointer<pthread_cond_t>
1919
let matt : UnsafeMutablePointer<pthread_mutexattr_t>
2020

21+
@availability(*, deprecated=2.1, message="Concurrency primitives are being moved to Concurrent.framework")
2122
public init() {
2223
self.stream = []
2324
var mattr : UnsafeMutablePointer<pthread_mutexattr_t> = UnsafeMutablePointer.alloc(sizeof(pthread_mutexattr_t))
@@ -38,6 +39,7 @@ public final class Chan<A> {
3839
}
3940

4041
/// Writes a value to a channel.
42+
@availability(*, deprecated=2.1, message="Concurrency primitives are being moved to Concurrent.framework")
4143
public func write(a : A) {
4244
pthread_mutex_lock(mutex)
4345
stream.append(a)
@@ -46,6 +48,7 @@ public final class Chan<A> {
4648
}
4749

4850
/// Reads a value from the channel.
51+
@availability(*, deprecated=2.1, message="Concurrency primitives are being moved to Concurrent.framework")
4952
public func read() -> A {
5053
pthread_mutex_lock(mutex)
5154
while (stream.isEmpty) {
@@ -58,11 +61,13 @@ public final class Chan<A> {
5861
}
5962

6063
/// Write | Writes a value to a channel.
64+
@availability(*, deprecated=2.1, message="Concurrency primitives are being moved to Concurrent.framework")
6165
public func <-<A>(chan : Chan<A>, value : A) -> Void {
6266
chan.write(value)
6367
}
6468

6569
/// Read | Reads a value from the channel.
70+
@availability(*, deprecated=2.1, message="Concurrency primitives are being moved to Concurrent.framework")
6671
public prefix func <-<A>(chan : Chan<A>) -> A {
6772
return chan.read()
6873
}

Swiftz/ExecutionContext.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@ public protocol ExecutionContext {
1515
/// Computes a value for a Future given a work block.
1616
///
1717
/// When work concludes this function must execute Future.sig(_:) to fulfill the Future.
18+
@availability(*, deprecated=2.1, message="Concurrency primitives are being moved to Concurrent.framework")
1819
func submit<A>(x: Future<A>, work: () -> A)
1920
}

0 commit comments

Comments
 (0)