@Override
    public void markCompleted() {
      if (completed.compareAndSet(false, true)) {
        queue.markTaskCompleted(this);
      }
    }
Instantiates a new InMemory task.

@param queue the queue
@param data the data
services/tasks/src/main/java/org/hyperledger/besu/services/tasks/InMemoryTasksPriorityQueues.java