mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-08 22:33:26 +01:00
29 lines
637 B
Swift
29 lines
637 B
Swift
//
|
|
// DatabaseManager+Async.swift
|
|
// AltStoreCore
|
|
//
|
|
// Created by Riley Testut on 8/22/23.
|
|
// Copyright © 2023 Riley Testut. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public extension DatabaseManager
|
|
{
|
|
func start() async throws
|
|
{
|
|
try await withCheckedThrowingContinuation { (continuation: CheckedContinuation<Void, Error>) in
|
|
self.start { error in
|
|
if let error
|
|
{
|
|
continuation.resume(throwing: error)
|
|
}
|
|
else
|
|
{
|
|
continuation.resume()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|