worker library

Worker-based architecture for offloading heavy operations to isolate/worker.

Use this API to run SyncEngine in a separate thread, keeping the main thread responsive for UI.

Classes

BackendWorkerHandlerContext
InMemoryStorageWorkerHandler
RemoteWorkerHandler
Worker-thread handler for creating remote backend instances.
StorageWorkerHandler
Worker-thread handler for creating local storage instances.
WorkerHandlerChannel
WorkerHandlerContext
WorkerParams

Functions

workerMain(WorkerSetup setupFn, {void onWorkerSpawn()?}) → void
Entry point for web workers - called when worker JS loads.

Typedefs

WorkerSetup = Future<WorkerParams> Function()
Factory function type for creating EngineParams in worker.

Exceptions / Errors

RemoteMismatchException
Exception thrown when main and worker handler registrations don't match.