Skip to content

Commit 08de933

Browse files
committed
[Concurrency] Task revisions 3
- introduce UnsafeCurrentTask - implement Hashable, Equatable on tasks - assume we'll have a way to get a task from sync context - Task.Handle now has a Failure type as well - Task.Handle.getResult
1 parent 30a86aa commit 08de933

12 files changed

+344
-60
lines changed

include/swift/ABI/TaskStatus.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
namespace swift {
2727

28-
/// The abstract base class for all sttatus records.
28+
/// The abstract base class for all status records.
2929
///
3030
/// TaskStatusRecords are typically allocated on the stack (possibly
3131
/// in the task context), partially initialized, and then atomically

stdlib/public/Concurrency/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ add_swift_target_library(swift_Concurrency ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} I
3838
Actor.swift
3939
CheckedContinuation.swift
4040
GlobalExecutor.cpp
41+
Executor.swift
4142
AsyncIteratorProtocol.swift
4243
AsyncSequence.swift
4344
PartialAsyncTask.swift
4445
Task.cpp
4546
Task.swift
4647
TaskCancellation.swift
47-
_TimeTypes.swift
4848
TaskAlloc.cpp
4949
TaskStatus.cpp
5050
TaskGroup.cpp

stdlib/public/Concurrency/Executor.swift

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
////
33
//// This source file is part of the Swift.org open source project
44
////
5-
//// Copyright (c) 2020 Apple Inc. and the Swift project authors
5+
//// Copyright (c) 2021 Apple Inc. and the Swift project authors
66
//// Licensed under Apache License v2.0 with Runtime Library Exception
77
////
88
//// See https://swift.org/LICENSE.txt for license information
@@ -12,9 +12,5 @@
1212

1313
import Swift
1414

15-
@rethrows
16-
public protocol AsyncSequence {
17-
associatedtype AsyncIterator: AsyncIteratorProtocol where AsyncIterator.Element == Element
18-
associatedtype Element
19-
func makeAsyncIterator() -> AsyncIterator
20-
}
15+
// TODO: just a placeholder; proposal and complete types soon
16+
public protocol ExecutorRef {}

0 commit comments

Comments
 (0)