• 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();
    ♡ recommended by @OCTAGRAM

Replies (1)