class Async::Children

A list of children tasks.

def added(node)

def added(node)
	if node.transient?
		@transient_count += 1
	end
	
	return super
end

def adjust_transient_count(transient)

@parameter transient [Boolean] Whether to increment or decrement the transient count.

Despite being public, this is not intended to be called directly. It is used internally by {Node#transient=}.

Adjust the number of transient children, assuming it has changed.
def adjust_transient_count(transient)
	if transient
		@transient_count += 1
	else
		@transient_count -= 1
	end
end

def finished?

Whether all children are considered finished. Ignores transient children.
def finished?
	@size == @transient_count
end

def initialize

Create an empty list of children tasks.
def initialize
	super
	@transient_count = 0
end

def nil?

Whether the children is empty, preserved for compatibility.
def nil?
	empty?
end

def removed(node)

def removed(node)
	if node.transient?
		@transient_count -= 1
	end
	
	return super
end

def transients?

@returns [Boolean] Whether the node has transient children.
Some children may be marked as transient. Transient children do not prevent the parent from finishing.
def transients?
	@transient_count > 0
end