register
Register a BackgroundWorker factory for taskId. Must be called before start. Throws if start has already run or taskId is already registered.
The factory closes over the user's DI graph (Koin, Hilt, hand-wired, any of them — the library doesn't care). Each dispatch invokes the factory afresh; workers are never cached.
Throws
Register a BackgroundWorkerFactory that owns many task ids at once. Must be called before start. Throws if start has already run, or any of the factory's BackgroundWorkerFactory.taskIds collide with an existing per-id registration or another factory.
This is the bulk alternative to per-id register — one factory object, many ids, lazy worker resolution. See BackgroundWorkerFactory for the taskIds / create sync contract.
Throws
if start has already run.
if any of the factory's ids is already registered.