fix: initial working version with libparakeet

This commit is contained in:
鲁树人
2023-05-13 20:03:32 +01:00
parent 3c1434b09f
commit 3d2761a2b1
4 changed files with 23 additions and 5 deletions

View File

@@ -5,6 +5,9 @@ import { DECRYPTION_WORKER_ACTION_NAME } from './constants';
// TODO: Worker pool?
export const workerClient = new Worker(new URL('./worker', import.meta.url), { type: 'module' });
// FIXME: report the error so is obvious to the user.
workerClient.onerror = (err) => console.error(err);
class DecryptionQueue extends ConcurrentQueue<{ id: string; blobURI: string }> {
constructor(private workerClientBus: WorkerClientBus, maxQueue?: number) {
super(maxQueue);