Closed marbemac closed 6 years ago
How have you built in pauses? The full execution of this is synchronous. Do you have a broken test?
You're right, this issue actually might actually be attributable to a different bit of our implementation. Will close for now and re-open with example broken tests if we're able to pinpoint the issue.
Something that we've noticed is that the
arr
value is shared globally.https://github.com/davidmarkclements/fast-safe-stringify/blob/master/index.js#L6
We run a bunch of low priority processes in parallel that all use safeStringify and have built in "pauses" to allow other high priority processes to use the main thread. This is leading to odd behavior since all the safeStringify's use the same
arr
object. There are a number of potential solutions to this that we could help to implement, but curious if you have any thoughts or preferred approaches?