progress_end: End a progress node

View source: R/progress.R

progress_endR Documentation

End a progress node

Description

Closes the handle, pops it off the active-progress stack, and emits a final sink event or console output. Ending a handle that is not the innermost auto-closes everything nested above it as "aborted" (their sink events fire), so the stack stays consistent. No-op on an already closed handle.

Usage

progress_end(handle, status = c("done", "error", "aborted"))

Arguments

handle

rtemis_progress handle from progress_begin().

status

Character: "done", "error", or "aborted".

Details

In "ansi" mode, only the outermost end prints a permanent completion line (⁠label n/total done in 0:41⁠); inner-level ends just redraw the remaining breadcrumb, so tight nested loops don't spam the console. Non-"ansi" output prints a completion line per handle.

When nested loops complete uniformly, the completion line reports them as a multiplication chain, e.g. ⁠Outer 2/2 x Tuning 24/24 done in 0:41⁠. A nested level is included only when every one of its runs completed with status = "done", reached its total, and had the same label and total as its sibling runs; otherwise the chain is omitted rather than reporting a misleading count. Deeper nesting chains recursively.

Value

NULL invisibly.

Author(s)

EDG

See Also

Other progress: progress_begin(), progress_clear(), progress_lapply(), progress_update()

Examples

h <- progress_begin(2L, label = "Fitting", output_type = "plain")
progress_update(h)
progress_end(h)

rtemis.core documentation built on Sept. 20, 2026, 9:06 a.m.