File tree 9 files changed +41
-22
lines changed
9 files changed +41
-22
lines changed Original file line number Diff line number Diff line change 1
1
{
2
+ "originHash" : " 109102968f72b508a09c97740fede846eb2bb9291019254db091bfbfbc0e073a" ,
2
3
"pins" : [
3
4
{
4
5
"identity" : " swift-docc-plugin" ,
5
6
"kind" : " remoteSourceControl" ,
6
7
"location" : " https://github.com/apple/swift-docc-plugin" ,
7
8
"state" : {
8
- "revision" : " 3303b164430d9a7055ba484c8ead67a52f7b74f6" ,
9
+ "revision" : " 26ac5758409154cc448d7ab82389c520fa8a8247" ,
10
+ "version" : " 1.3.0"
11
+ }
12
+ },
13
+ {
14
+ "identity" : " swift-docc-symbolkit" ,
15
+ "kind" : " remoteSourceControl" ,
16
+ "location" : " https://github.com/apple/swift-docc-symbolkit" ,
17
+ "state" : {
18
+ "revision" : " b45d1f2ed151d057b54504d653e0da5552844e34" ,
9
19
"version" : " 1.0.0"
10
20
}
11
21
}
12
22
],
13
- "version" : 2
23
+ "version" : 3
14
24
}
Original file line number Diff line number Diff line change 8
8
Reliably testable Swift concurrency.
9
9
10
10
* [ Motivation] ( #motivation )
11
- * [ ` ActorIsolated ` and ` LockIsolated ` ] ( #actorisolated-and- lockisolated )
11
+ * [ ` LockIsolated ` ] ( #lockisolated )
12
12
* [ Streams] ( #streams )
13
13
* [ Tasks] ( #tasks )
14
14
* [ Serial execution] ( #serial-execution )
@@ -34,19 +34,16 @@ You can watch all of the episodes [here](https://www.pointfree.co/collections/co
34
34
This library comes with a number of tools that make working with Swift concurrency easier and more
35
35
testable.
36
36
37
- * [ ` ActorIsolated ` and ` LockIsolated ` ] ( #actorisolated-and- lockisolated )
37
+ * [ ` LockIsolated ` ] ( #lockisolated )
38
38
* [ Streams] ( #streams )
39
39
* [ Tasks] ( #tasks )
40
40
* [ ` UncheckedSendable ` ] ( #uncheckedsendable )
41
41
* [ Serial execution] ( #serial-execution )
42
42
43
- ### ` ActorIsolated ` and ` LockIsolated `
43
+ ### LockIsolated`
44
44
45
- The ` ActorIsolated ` and ` LockIsolated ` types help wrap other values in an isolated context.
46
- ` ActorIsolated ` wraps the value in an actor so that the only way to access and mutate the value is
47
- through an async/await interface. ` LockIsolated ` wraps the value in a class with a lock, which
48
- allows you to read and write the value with a synchronous interface. You should prefer to use
49
- ` ActorIsolated ` when you have access to an asynchronous context.
45
+ The ` LockIsolated ` type helps wrap other values in an isolated context. It wraps the value in a
46
+ class with a lock, which allows you to read and write the value with a synchronous interface.
50
47
51
48
### Streams
52
49
Original file line number Diff line number Diff line change 40
40
/// ```
41
41
///
42
42
/// To synchronously isolate a value, see ``LockIsolated``.
43
+ @available ( * , deprecated, message: " Use 'LockIsolated' instead. " )
43
44
public final actor ActorIsolated < Value> {
44
45
/// The actor-isolated value.
45
46
public var value : Value
Original file line number Diff line number Diff line change @@ -7,13 +7,10 @@ Useful, testable Swift concurrency.
7
7
This library comes with a number of tools that make working with Swift concurrency easier and more
8
8
testable.
9
9
10
- ### ActorIsolated and LockIsolated
10
+ ### LockIsolated
11
11
12
- The `` ActorIsolated `` and `` LockIsolated `` types help wrap other values in an isolated context.
13
- ` ActorIsolated ` wraps the value in an actor so that the only way to access and mutate the value is
14
- through an async/await interface. `` LockIsolated `` wraps the value in a class with a lock, which
15
- allows you to read and write the value with a synchronous interface. You should prefer to use
16
- ` ActorIsolated ` when you have access to an asynchronous context.
12
+ The ` LockIsolated ` type helps wrap other values in an isolated context. It wraps the value in a
13
+ class with a lock, which allows you to read and write the value with a synchronous interface.
17
14
18
15
### Streams
19
16
@@ -238,13 +235,12 @@ need to make weaker assertions due to non-determinism, but can still assert on s
238
235
239
236
### Data races
240
237
241
- - `` ActorIsolated ``
242
238
- `` LockIsolated ``
243
239
244
240
### Serial execution
245
241
246
242
- < doc:ReliablyTestingAsync >
247
- - `` withMainSerialExecutor(operation:)-79jpc ``
243
+ - `` withMainSerialExecutor(operation:)-5wq73 ``
248
244
249
245
### Preconcurrency
250
246
Original file line number Diff line number Diff line change
1
+ # Deprecations
2
+
3
+ Review unsupported reducer APIs and their replacements.
4
+
5
+ ## Overview
6
+
7
+ Avoid using deprecated APIs in your app. Select a method to see the replacement that you should use
8
+ instead.
9
+
10
+ ## Topics
11
+
12
+ ### Case path deprecations
13
+
14
+ - `` ActorIsolated ``
Original file line number Diff line number Diff line change @@ -2,8 +2,8 @@ import Foundation
2
2
3
3
/// A generic wrapper for isolating a mutable value with a lock.
4
4
///
5
- /// To asynchronously isolate a value on an actor, see ``ActorIsolated``. If you trust the
6
- /// sendability of the underlying value, consider using ``UncheckedSendable``, instead.
5
+ /// If you trust the sendability of the underlying value, consider using ``UncheckedSendable``,
6
+ /// instead.
7
7
@dynamicMemberLookup
8
8
public final class LockIsolated < Value> : @unchecked Sendable {
9
9
private var _value : Value
Original file line number Diff line number Diff line change 10
10
/// > that the type is safe to use from multiple threads, and the compiler cannot help you find
11
11
/// > potential race conditions in your code.
12
12
///
13
- /// To synchronously isolate a value with a lock, see ``LockIsolated``. To asynchronously isolated a
14
- /// value on an actor, see ``ActorIsolated``.
13
+ /// To synchronously isolate a value with a lock, see ``LockIsolated``.
15
14
#if swift(>=5.10)
16
15
@available ( iOS, deprecated: 9999 , message: " Use 'nonisolated(unsafe) let', instead. " ) @available (
17
16
macOS, deprecated: 9999 , message: " Use 'nonisolated(unsafe) let', instead. "
Original file line number Diff line number Diff line change 1
1
import ConcurrencyExtras
2
2
import XCTest
3
3
4
+ @available ( * , deprecated)
4
5
final class ActorIsolatedTests : XCTestCase {
5
6
func testAsyncWithValue( ) async {
6
7
let numbers = ActorIsolated < Set < Int > > ( [ ] )
Original file line number Diff line number Diff line change 17
17
XCTAssertEqual ( Array ( 1 ... 1000 ) , xs. value)
18
18
}
19
19
20
+ @available ( * , deprecated)
20
21
func testSerializedExecution_WithActor( ) async {
21
22
let xs = ActorIsolated < [ Int ] > ( [ ] )
22
23
await withMainSerialExecutor {
You can’t perform that action at this time.
0 commit comments