Optionalconfig: CSVWorkerPoolConfigInitializes the shared worker pool once for CSV parsing.
Indicates whether the CSV worker pool is initialized and usable.
True if the pool is initialized and available.
Returns the number of currently available workers for CSV tasks.
Count of idle workers.
Starts CSV parsing and exposes a task id for tracking and cancellation.
CSV file contents.
Optional parsing options including default status.
OptionalonProgress: (progress: ProgressMessage) => voidOptional callback for progress updates.
The task id and result promise.
startParsing(
fileContent: string,
options: { defaultStatus?: KenmeiStatus } = {},
onProgress?: (progress: ProgressMessage) => void,
): { taskId: string; promise: Promise<CSVResult> } {
const taskId = generateUUID();
const promise = this.dispatchParsing(
taskId,
fileContent,
onProgress,
options,
);
return { taskId, promise };
}
Parses a CSV file via the worker pool, returning structured results.
CSV file contents.
Optional parsing options including default status.
OptionalonProgress: (progress: ProgressMessage) => voidOptional callback for progress updates.
Parsed manga and stats.
Cancels an in-flight CSV parsing task.
The id of the task to cancel.
Returns current statistics for the shared worker pool.
Pool metrics including workers and active tasks.
Manages CSV parsing tasks backed by the shared generic worker pool with main-thread fallback.
Source