Creates a job with the specified index and function.
Job({ required this.index, required this.fn, });