AddWorkerArgs is the same as AddWorker except that it lets args be passed explicitly rather than being instantiated implicitly. We don't know of any use for this function beyond exercising some args-related edge cases in tests are difficult/impossible to exercise otherwise, and its use should be con
(workers *Workers, jobArgs T, worker Worker[T])
| 117 | // are difficult/impossible to exercise otherwise, and its use should be |
| 118 | // considered internal only. |
| 119 | func AddWorkerArgs[T JobArgs](workers *Workers, jobArgs T, worker Worker[T]) { |
| 120 | if err := workers.add(jobArgs, &workUnitFactoryWrapper[T]{worker: worker}); err != nil { |
| 121 | panic(err) |
| 122 | } |
| 123 | } |
| 124 | |
| 125 | // AddWorkerSafely registers a worker on the provided Workers bundle. Unlike AddWorker, |
| 126 | // AddWorkerSafely does not panic and instead returns an error if the worker |
searching dependent graphs…