Closed harlanhaskins closed 4 years ago
Okay the issue here is with unguarded accesses to the outputData
and errorData
of the call to launchBash
. They're set on a reader thread in the readabilityHandler
of the error
/outputPipe
arguments, but then read from the caller's queue at the end of the function. This can be mitigated by protecting accesses to the outputData
and errorData
fields with a DispatchQueue
. PR incoming.
Was fixed a long time ago, just forgot to close this 😅
I've noticed, while trying to add parallel execution to Lite, if you try to execute
shellOut
on multiple dispatch queues it causes data races insideProcess.launchBash
. I'm not quite sure how to work around this, but I can try to take a look at a potential fix.