generatorThread.start();
integratorThread.start();
}
static void complicatedThreads() {
Task task = new Task();
task.count = 100;
Semaphore semaphore = new Semaphore();
Thread generatorThread = new Generator(task, semaphore, "Generator");
//generatorThread.setPriority(Thread.MAX_PRIORITY);
Thread integratorThread = new Integrator(task, semaphore, "Integrator");