Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  AVAsset+Extensions.swift   Sprache: JAVA

 

import AVFoundation.AVAsset

extension AVAsset {

    /// Method to get the AVAsset isExportable synchronously wrapping an async call.
    /// It blocks the Main Thread using a semaphore, but with a timeout of 0.1 seconds
    /// Only use this  if the  async version `await asset.load(isExportable)` is temporarily not possible
    func loadIsExportableSynchronously(timeout: TimeInterval = 0.1) -> Bool {
        let semaphore = DispatchSemaphore(value: 0)
        var result = false

        Task {
            result = await (try? self.load(.isExportable)) ?? false
            semaphore.signal()
        }

        let timeoutResult = semaphore.wait(
            timeout: .now() + timeout
        )

        if timeoutResult == .timedOut {
            return false
        }

        return result
    }
}

Messung
CHZG
859610093

¤ Dauer der Verarbeitung: 0.3 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover


Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1104845
#Domains=499266