You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: proposals/0454-task-naming-api.md
+23-19Lines changed: 23 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -48,21 +48,22 @@ By introducing this in a structured, coherent way in Swift itself, rather than d
48
48
49
49
## Detailed design
50
50
51
-
52
51
Naming tasks is only allowed during their creation, and modifying names is not allowed. Names are arbitrary user-defined strings, which may be computed at runtime because they often contain identifying information such as the request ID or similar runtime information.
53
52
54
53
In order to allow naming tasks, the following APIs will be provided on `Task`:
These APIs would be added to all kinds of task groups, including throwing, discarding ones. With the signature being appropriately matching the existing addTask signatures of those groups
@@ -90,7 +90,11 @@ In addition to that, it will be possible to read a name off a task, similar to h
90
90
91
91
```swift
92
92
extensionTask {
93
-
var currentName:String? { get }
93
+
// read the name of a task instance, e.g. someTask.name
94
+
var name: String? { get }
95
+
96
+
// read the name of the current task, e.g. Task.name
0 commit comments