I've recently encountered a crash in DateTimeParsers.swift.
My crash occurred on line 81:
Self.calendarCache[0] = calendar
Which references this static variable:
private static var calendarCache = [Int : Calendar]()
I was parsing multiple GPX files inside Swift.Tasks. I believe this crash is concurrency driven where multiple threads attempted to access the same static variable.
Could thread safety be improved by using for example an Actor? Or should I consider CoreGPX not thread safe and try to always parse my GPX files sequentially?
Hi!
I've recently encountered a crash in DateTimeParsers.swift.
My crash occurred on line 81:
Which references this static variable:
I was parsing multiple GPX files inside
Swift.Task
s. I believe this crash is concurrency driven where multiple threads attempted to access the same static variable.Could thread safety be improved by using for example an
Actor
? Or should I consider CoreGPX not thread safe and try to always parse my GPX files sequentially?Thanks in advance