I have a syntax which works perfectly when run from the main thread, but when I wrap it like this:
DispatchQueue.global().async {
let syntax = try SyntaxParser.parse(sourceURL)
let result = myRewriter.visit(syntax)
}
I get an ExecBadAccess several layers deep into visitChildren
Is there a reason related to SwiftSyntax why this should not work?
I'm using the Swift 5.1 release of SwiftSyntax if it matters.
cukr
2
Ah yes this seems to be exactly the issue, thanks! I guess the best solution is to try to increase the stack size of the thread