@@ -388,47 +388,4 @@ private func disableAnimations<T>(app: AXUIElement, _ body: () -> T) -> T {
388388 return body ( )
389389}
390390
391- public final class ThreadGuardedValue < Value> : Sendable {
392- private nonisolated ( unsafe) var _threadGuarded : Value ?
393- private let threadToken : AxAppThreadToken = axTaskLocalAppThreadToken ?? dieT ( " axTaskLocalAppThreadToken is not initialized " )
394- public init ( _ value: Value ) { self . _threadGuarded = value }
395- var threadGuarded : Value {
396- get {
397- threadToken. checkEquals ( axTaskLocalAppThreadToken)
398- return _threadGuarded ?? dieT ( " Value is already destroyed " )
399- }
400- set ( newValue) {
401- threadToken. checkEquals ( axTaskLocalAppThreadToken)
402- _threadGuarded = newValue
403- }
404- }
405- func destroy( ) {
406- threadToken. checkEquals ( axTaskLocalAppThreadToken)
407- _threadGuarded = nil
408- }
409- deinit {
410- check ( _threadGuarded == nil , " The Value must be explicitly destroyed on the appropriate thread before deinit " )
411- }
412- }
413-
414- public final class MutableUnsafeSendable < T> : Sendable {
415- nonisolated ( unsafe) var unsafe: T
416- public init ( _ value: T ) { self . unsafe = value }
417- }
418-
419- public final class UnsafeSendable < T> : Sendable {
420- nonisolated ( unsafe) let unsafe: T
421- public init ( _ value: T ) { self . unsafe = value }
422- }
423-
424391public typealias Continuation < T> = CheckedContinuation < T , Never >
425-
426- extension NSRunningApplication {
427- func isFirefox( ) -> Bool {
428- [ " org.mozilla.firefox " , " org.mozilla.firefoxdeveloperedition " , " org.mozilla.nightly " ] . contains ( bundleIdentifier ?? " " )
429- }
430-
431- var idForDebug : String {
432- " PID: \( processIdentifier) ID: \( bundleIdentifier ?? executableURL? . description ?? " " ) "
433- }
434- }
0 commit comments