synchronized private void jobFinished(Job j){
        jobsFinished++;
        if(noMoreJobs && jobsFinished==jobsRunned){
            System.out.println(jobsFinished+" "+jobsRunned);
            jobsFinished=0;jobsRunned=0;
            fireJobManagerHasFinishedEvent(new JobEvent(j));
        } 
    }