-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into webview_capture_service_fix
- Loading branch information
Showing
8 changed files
with
73 additions
and
16 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
Sources/EmbraceCommonInternal/Protocols/DispatchableQueue.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// | ||
// Copyright © 2024 Embrace Mobile, Inc. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
public protocol DispatchableQueue: AnyObject { | ||
func async(_ block: @escaping () -> Void) | ||
func sync(execute block: () -> Void) | ||
} | ||
|
||
extension DispatchQueue: DispatchableQueue { | ||
public func async(_ block: @escaping () -> Void) { | ||
async(group: nil, execute: block) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// | ||
// Copyright © 2024 Embrace Mobile, Inc. All rights reserved. | ||
// | ||
|
||
import EmbraceCommonInternal | ||
|
||
public class MockQueue: DispatchableQueue { | ||
public func async(_ block: @escaping () -> Void) { | ||
block() | ||
} | ||
|
||
public func sync(execute block: () -> Void) { | ||
block() | ||
} | ||
|
||
public init() {} | ||
} |