// To avoid the recursive read lock on s.Jobs() and this function,
// creating this new function and distributing the lock between jobPresent, _jobPresent
To avoid the recursive read lock on s.Jobs() and this function,
creating this new function and distributing the lock between jobPresent, _jobPresent
// To avoid the recursive read lock on s . Jobs () and this function // creating this new function and distributing the lock between jobPresent _jobPresent
func (s *Scheduler) _jobPresent(j *Job, jobs []*Job) bool {
	s.jobsMutex.RLock()
	defer s.jobsMutex.RUnlock()
	for _, job := range jobs {
		if job == j {
			return true
		}
	}
	return false
}
func ( s * Scheduler ) _jobPresent ( j * Job , jobs [ ] * Job ) bool { s . jobsMutex . RLock ( ) defer s . jobsMutex . RUnlock ( ) for _ , job := range jobs { if job == j { return true } } return false }
To avoid the recursive read lock on s.Jobs() and this function,
creating this new function and distributing the lock between jobPresent, _jobPresent
To avoid the recursive read lock on s . Jobs () and this function creating this new function and distributing the lock between jobPresent _jobPresent