Commit af73f1c
committed
Mark event monitor properties as nonisolated(unsafe)
The event monitor properties need to be accessible from nonisolated
stop methods that are called from deinit. Marking them as
nonisolated(unsafe) is safe because:
- They are opaque tokens from NSEvent.addMonitorForEvents
- NSEvent.removeMonitor is thread-safe
- We only read them to pass to removeMonitor
This resolves the MainActor isolation compilation errors.1 parent d310b6a commit af73f1c
1 file changed
+4
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
| 18 | + | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | | - | |
| 22 | + | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
0 commit comments