closeWorker method
Implementation
void closeWorker(String id) {
assert(
_createdWorkers.containsKey(id),
'You are trying to remove worker with with a nonexistent id($id).\n'
'This can happen if you call close() twice.',
);
_createdWorkers.remove(id)?.close();
}