mirror of
https://github.com/coteditor/CotEditor.git
synced 2024-09-11 11:25:57 +03:00
Use .barrier for rangesQueue in syntax highlight
This commit is contained in:
parent
2254286bc7
commit
46c6d33508
@ -14,6 +14,7 @@ unreleased
|
||||
|
||||
### Fixes
|
||||
|
||||
- [beta] Fix an issue the application could crash while typing.
|
||||
- [tirivial] Fix an issue on macOS 10.12 and earlier where the Japanese label of the menu item toggling toolbar visibility did not reflect the current visibility state.
|
||||
|
||||
|
||||
|
@ -154,12 +154,12 @@ final class SyntaxHighlightParseOperation: AsynchronousOperation, ProgressReport
|
||||
|
||||
guard !extractedRanges.isEmpty else { return }
|
||||
|
||||
rangesQueue.sync {
|
||||
rangesQueue.async(flags: .barrier) {
|
||||
ranges += extractedRanges
|
||||
}
|
||||
}
|
||||
|
||||
highlights[syntaxType] = ranges
|
||||
highlights[syntaxType] = rangesQueue.sync { ranges }
|
||||
|
||||
childProgress.completedUnitCount = childProgress.totalUnitCount
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user