mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-18 10:04:08 +00:00
parent
7658fc3855
commit
1af0df3fbd
@ -1,19 +0,0 @@
|
|||||||
diff --git a/osdep/mac/input_helper.swift b/osdep/mac/input_helper.swift
|
|
||||||
index 0acec6bd40..0ec5837864 100644
|
|
||||||
--- a/osdep/mac/input_helper.swift
|
|
||||||
+++ b/osdep/mac/input_helper.swift
|
|
||||||
@@ -18,6 +18,14 @@
|
|
||||||
import Cocoa
|
|
||||||
import Carbon.HIToolbox
|
|
||||||
|
|
||||||
+extension NSCondition {
|
|
||||||
+ fileprivate func withLock<T>(_ body: () throws -> T) rethrows -> T {
|
|
||||||
+ self.lock()
|
|
||||||
+ defer { self.unlock() }
|
|
||||||
+ return try body()
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
class InputHelper: NSObject {
|
|
||||||
var option: OptionHelper?
|
|
||||||
var lock = NSCondition()
|
|
Loading…
Reference in New Issue
Block a user