Protected
Readonly
hydratorProtected
queueProtected
terminationThe termination delay determines how long the parser waits for a thread to finish after a cancellation request. The default value is 200(ms).
Protected
threadThe thread count determines how many threads are used to parse files in parallel. The default value is 8. Decreasing this value increases startup performance, but decreases parallel parsing performance.
Protected
workerProtected
workerProtected
acquireProtected
createProtected
initializeParses the given text and returns the parse result.
The text to parse.
A cancellation token that can be used to cancel the parsing process.
A promise that resolves to the parse result.
Protected
terminate
Async parser that allows cancellation of the current parsing process.
Remarks
The sync parser implementation is blocking the event loop, which can become quite problematic for large files. The default implementation is not actually async. It just wraps the sync parser in a promise. A real implementation would create worker threads or web workers to offload the parsing work.