Added function pointer for predicate to sort initial ready queue