Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Feb 2, 2025. It is now read-only.

Commitd15c034

Browse files
authored
Merge pull request#37 from YuAo/master
Make SwiftCoroutine compatible with `async/await` in Swift 5.5
2 parents9c395df +7235e38 commitd15c034

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

‎Sources/SwiftCoroutine/CoFuture/Core/CoFuture.swift‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// Copyright © 2020 Alex Belozierov. All rights reserved.
77
//
88

9-
privateprotocol_CoFutureCancellable:class{
9+
privateprotocol_CoFutureCancellable:AnyObject{
1010

1111
func cancel()
1212

‎Sources/SwiftCoroutine/CoScope/CoCancellable.swift‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// Copyright © 2020 Alex Belozierov. All rights reserved.
77
//
88

9-
publicprotocolCoCancellable:class{
9+
publicprotocolCoCancellable:AnyObject{
1010

1111
/// Cancels the current `CoCancellable`.
1212
func cancel()

‎Sources/SwiftCoroutine/Coroutine/Coroutine/Coroutine.swift‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public struct Coroutine {
122122
timer.schedule(deadline:.now()+ time)
123123
defer{ timer.cancel()}
124124
do{
125-
tryawait{
125+
tryself.await{
126126
timer.setEventHandler(handler: $0)
127127
timer.start()
128128
}

‎Sources/SwiftCoroutine/Coroutine/CoroutineProtocol/CoroutineProtocol.swift‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import Glibc
1212
import Darwin
1313
#endif
1414

15-
@usableFromInlineinternalprotocolCoroutineProtocol:class{
15+
@usableFromInlineinternalprotocolCoroutineProtocol:AnyObject{
1616

1717
typealiasStackSize=Coroutine.StackSize
1818

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp