File tree Expand file tree Collapse file tree 1 file changed +15
-14
lines changed Expand file tree Collapse file tree 1 file changed +15
-14
lines changed Original file line number Diff line number Diff line change 15
15
import Dispatch
16
16
17
17
final class NaiveQueueExecutor : TaskExecutor {
18
- let queue : DispatchQueue
18
+ let queue : DispatchQueue
19
19
20
- init ( _ queue: DispatchQueue ) {
21
- self . queue = queue
22
- }
20
+ init ( _ queue: DispatchQueue ) {
21
+ self . queue = queue
22
+ }
23
23
24
- public func enqueue( _ _job: consuming ExecutorJob ) {
25
- let job = UnownedJob ( _job)
26
- queue. async {
27
- job. runSynchronously (
28
- on: self . asUnownedTaskExecutor ( ) )
24
+ public func enqueue( _ _job: consuming ExecutorJob ) {
25
+ let job = UnownedJob ( _job)
26
+ queue. async {
27
+ job. runSynchronously (
28
+ on: self . asUnownedTaskExecutor ( )
29
+ )
30
+ }
29
31
}
30
- }
31
32
32
- @inlinable
33
- public func asUnownedTaskExecutor( ) -> UnownedTaskExecutor {
34
- UnownedTaskExecutor ( ordinary: self )
35
- }
33
+ @inlinable
34
+ public func asUnownedTaskExecutor( ) -> UnownedTaskExecutor {
35
+ UnownedTaskExecutor ( ordinary: self )
36
+ }
36
37
}
You can’t perform that action at this time.
0 commit comments