← All posts tagged ахаха

khades
Java Саша ахаха прикроти Optional<AtomicReference<Task>> task = queue.stream()
.filter(referencedTask ->
{
if (!referencedTask.get().isBlocking(newBlockingRoles)) {
Task unreferencedTask = referencedTask.get();
return referencedTask.compareAndSet(unreferencedTask, unreferencedTask.addJob(newBlockingRoles, job));
} else
return false;
})
.findFirst();