task 4 review

It's better to use ScheduledThreadPool for generator.