@@ -7,9 +7,10 @@ extension JavaScriptEventLoop {
7
7
8
8
static func installByLegacyHook( ) {
9
9
#if compiler(>=5.9)
10
- typealias swift_task_asyncMainDrainQueue_hook_Fn = @convention ( thin) (
11
- swift_task_asyncMainDrainQueue_original , swift_task_asyncMainDrainQueue_override
12
- ) -> Void
10
+ typealias swift_task_asyncMainDrainQueue_hook_Fn =
11
+ @convention ( thin) (
12
+ swift_task_asyncMainDrainQueue_original , swift_task_asyncMainDrainQueue_override
13
+ ) -> Void
13
14
let swift_task_asyncMainDrainQueue_hook_impl : swift_task_asyncMainDrainQueue_hook_Fn = { _, _ in
14
15
swjs_unsafe_event_loop_yield ( )
15
16
}
@@ -19,7 +20,8 @@ extension JavaScriptEventLoop {
19
20
)
20
21
#endif
21
22
22
- typealias swift_task_enqueueGlobal_hook_Fn = @convention ( thin) ( UnownedJob , swift_task_enqueueGlobal_original )
23
+ typealias swift_task_enqueueGlobal_hook_Fn =
24
+ @convention ( thin) ( UnownedJob , swift_task_enqueueGlobal_original )
23
25
-> Void
24
26
let swift_task_enqueueGlobal_hook_impl : swift_task_enqueueGlobal_hook_Fn = { job, original in
25
27
JavaScriptEventLoop . shared. unsafeEnqueue ( job)
@@ -29,9 +31,10 @@ extension JavaScriptEventLoop {
29
31
to: UnsafeMutableRawPointer ? . self
30
32
)
31
33
32
- typealias swift_task_enqueueGlobalWithDelay_hook_Fn = @convention ( thin) (
33
- UInt64 , UnownedJob , swift_task_enqueueGlobalWithDelay_original
34
- ) -> Void
34
+ typealias swift_task_enqueueGlobalWithDelay_hook_Fn =
35
+ @convention ( thin) (
36
+ UInt64 , UnownedJob , swift_task_enqueueGlobalWithDelay_original
37
+ ) -> Void
35
38
let swift_task_enqueueGlobalWithDelay_hook_impl : swift_task_enqueueGlobalWithDelay_hook_Fn = {
36
39
nanoseconds,
37
40
job,
@@ -45,9 +48,10 @@ extension JavaScriptEventLoop {
45
48
)
46
49
47
50
#if compiler(>=5.7)
48
- typealias swift_task_enqueueGlobalWithDeadline_hook_Fn = @convention ( thin) (
49
- Int64 , Int64 , Int64 , Int64 , Int32 , UnownedJob , swift_task_enqueueGlobalWithDelay_original
50
- ) -> Void
51
+ typealias swift_task_enqueueGlobalWithDeadline_hook_Fn =
52
+ @convention ( thin) (
53
+ Int64 , Int64 , Int64 , Int64 , Int32 , UnownedJob , swift_task_enqueueGlobalWithDelay_original
54
+ ) -> Void
51
55
let swift_task_enqueueGlobalWithDeadline_hook_impl : swift_task_enqueueGlobalWithDeadline_hook_Fn = {
52
56
sec,
53
57
nsec,
@@ -64,9 +68,10 @@ extension JavaScriptEventLoop {
64
68
)
65
69
#endif
66
70
67
- typealias swift_task_enqueueMainExecutor_hook_Fn = @convention ( thin) (
68
- UnownedJob , swift_task_enqueueMainExecutor_original
69
- ) -> Void
71
+ typealias swift_task_enqueueMainExecutor_hook_Fn =
72
+ @convention ( thin) (
73
+ UnownedJob , swift_task_enqueueMainExecutor_original
74
+ ) -> Void
70
75
let swift_task_enqueueMainExecutor_hook_impl : swift_task_enqueueMainExecutor_hook_Fn = { job, original in
71
76
JavaScriptEventLoop . shared. unsafeEnqueue ( job)
72
77
}
0 commit comments