Skip to content

Commit f25369d

Browse files
committed
Minor fixes
1 parent a722748 commit f25369d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

stdlib/public/Concurrency/Actor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ static _CFThreadRef __initialPthread = INVALID_HANDLE_VALUE;
246246
static bool isExecutingOnMainThread() {
247247
#if defined(__linux__)
248248
return syscall(SYS_gettid) == getpid();
249-
#elseif defined(_WIN32)
249+
#elif defined(_WIN32)
250250
if (__initialPthread == INVALID_HANDLE_VALUE) {
251251
DuplicateHandle(GetCurrentProcess(), GetCurrentThread(),
252252
GetCurrentProcess(), &__initialPthread, 0, FALSE,

test/Concurrency/Runtime/data_race_detection.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,14 @@ actor MyActor {
5757
struct Runner {
5858
@MainActor static func main() async {
5959
print("Launching a main-actor task")
60-
// CHECK: warning: data race detected: @MainActor function at main/data_race_detection.swift:15 was not called on the main thread
60+
// CHECK: warning: data race detected: @MainActor function at main/data_race_detection.swift:21 was not called on the main thread
6161
launchFromMainThread()
6262
sleep(1)
6363

6464
let actor = MyActor()
6565
let actorFn = await actor.getTaskOnMyActor()
6666
print("Launching an actor-instance task")
67-
// CHECK: warning: data race detected: actor-isolated function at main/data_race_detection.swift:44 was not called on the same actor
67+
// CHECK: warning: data race detected: actor-isolated function at main/data_race_detection.swift:50 was not called on the same actor
6868
launchTask(actorFn)
6969

7070
sleep(1)

0 commit comments

Comments
 (0)