public int drainTo(final Collection<? super Runnable> collection) {
		final var tasks = new ArrayList<Task>();
		final int drained = _tasks.drainTo(tasks);
		tasks.forEach(t -> collection.add(t.task()));
		return drained;
	}
Removes all pending tasks from the queue and adds them to the given
{@code collection}.

@param collection the collection to transfer elements into
@return the number of elements transferred
@throws NullPointerException if the specified {@code collection} is
        {@code null}
jenetics.incubator/src/main/java/io/jenetics/incubator/util/TaskCompletion.java