Skip to content

Spelling concurrency #42547

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Apr 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// RUN: %target-typecheck-verify-swift -disable-availability-checking -debugger-support
// REQUIRES: concurrency

// This test simulates LLDB's expression evaluator makeing an otherwise illegal
// This test simulates LLDB's expression evaluator making an otherwise illegal
// synchronous call into an extension of an actor, as it would to run `p n` in
// this example.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ func zim(y: Bar, x: Foo, z: Baz) { print("hooray") }

return try await zim(y: y, x: x, z: z)
} catch {
// CHECK: oopsie woopsie
print("oopsie woopsie")
// CHECK: oopsie whoopsie
print("oopsie whoopsie")
}
}
}
4 changes: 2 additions & 2 deletions test/Concurrency/Runtime/exclusivity.swift
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ struct Runner {
}

// Then do a simple test with a single access to make sure that we do
// not hit any sccesses b/c we introduced the Task.
// not hit any successes b/c we introduced the Task.
exclusivityTests.test("testDifferentTasksHaveDifferentExclusivityAccessSets") { @MainActor in
let callee2 = { @MainActor (_ x: inout Int) -> Void in
debugLog("==> Enter callee2")
Expand Down Expand Up @@ -415,7 +415,7 @@ struct Runner {
await innerTaskHandle.value
debugLog("==> After")
}
// Accessis over. We shouldn't crash here.
// Access is over. We shouldn't crash here.
withExclusiveAccess(to: &global1) { _ in
debugLog("==> No crash!")
}
Expand Down
8 changes: 4 additions & 4 deletions test/Concurrency/Runtime/exclusivity_custom_executors.swift
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,13 @@ public final class MySerialExecutor : SerialExecutor {

@inlinable
public nonisolated var unownedExecutor: UnownedSerialExecutor {
debugLog("==> MyMainActor: Getting unowned exector!")
debugLog("==> MyMainActor: Getting unowned executor!")
return executor.asUnownedSerialExecutor()
}

@inlinable
public static var sharedUnownedExecutor: UnownedSerialExecutor {
debugLog("==> MyMainActor: Getting shared unowned exector!")
debugLog("==> MyMainActor: Getting shared unowned executor!")
return MySerialExecutor.sharedUnownedExecutor
}

Expand All @@ -124,14 +124,14 @@ public final class MySerialExecutor : SerialExecutor {

@inlinable
public nonisolated var unownedExecutor: UnownedSerialExecutor {
debugLog("==> MyMainActorWithAccessInUnownedExecAccessor: Getting unowned exector!")
debugLog("==> MyMainActorWithAccessInUnownedExecAccessor: Getting unowned executor!")
withExclusiveAccess(to: &global) { _ in debugLog("Crash!") }
return executor.asUnownedSerialExecutor()
}

@inlinable
public static var sharedUnownedExecutor: UnownedSerialExecutor {
debugLog("==> MyMainActorWithAccessInUnownedExecAccessor: Getting shared unowned exector!")
debugLog("==> MyMainActorWithAccessInUnownedExecAccessor: Getting shared unowned executor!")
return MySerialExecutor.sharedUnownedExecutor
}

Expand Down
2 changes: 1 addition & 1 deletion test/Concurrency/builtin_silgen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import _Concurrency
func suspend() async {}

// Builtin.hopToActor should generate a mandatory hop_to_executor
// before releaseing the actor and reaching a suspend.
// before releasing the actor and reaching a suspend.
//
// CHECK-LABEL: sil private @$s14builtin_silgen11runDetachedyyFyyYaYbcfU_ : $@convention(thin) @Sendable @async @substituted <τ_0_0> () -> @out τ_0_0 for <()>
// CHECK: [[ACTOR:%.*]] = apply {{%.*}}({{%.*}}) : $@convention(method) (@thick MainActor.Type) -> @owned MainActor
Expand Down
2 changes: 1 addition & 1 deletion test/Concurrency/throwing.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ extension MP {
var tests = TestSuite("Async Throw")

if #available(SwiftStdlib 5.1, *) {
tests.test("throwing of naturally direct but indirect reabstration") {
tests.test("throwing of naturally direct but indirect reabstraction") {
let task2 = detach {
let m = M()
await verifyCancelled {
Expand Down