Pbar

Pbar.last_renderConstant

Stores the timestamp of the last render in the progress bar.

Pbar.min_deltaConstant

Stores the minimum time difference required between two render updates.

Pbar.pbarConstant

Holds a reference to the current progress bar or nothing if no progress bar is active.

Pbar.pbar_lockConstant

Holds a lock to avoid flickering when updating the progress bar.

Pbar.pbjConstant

The current job being rendered.

Pbar.pluConstant

The last update timestamp.

Pbar.RunningJobType

Represents a job that is currently running in the progress bar.

  • job

  • counter

  • updated_at

The RunningJob struct holds a ProgressJob, a counter, and a timestamp of when it was last updated. The job field is of type ProgressJob which represents the job that is currently running. The counter field is an integer that defaults to 1 and is used to keep track of the progress of the job. The updated_at field is a DateTime object that stores the timestamp of when the job was last updated.

Pbar.clearpbarFunction

Clears the current progress bar.

clearpbar() -> Union{Nothing, Bool}
clearpbar(pb) -> Union{Nothing, Bool}

The clearpbar function stops all jobs in the current progress bar, empties the job list, and then stops the progress bar itself. It uses a lock to ensure thread safety during these operations.

Pbar.dorenderFunction

Renders the progress bar if enough time has passed since the last render.

Pbar.pbar!Method

Initializes a new progress bar.

pbar!(
;
    transient,
    columns,
    kwargs...
) -> Term.Progress.ProgressBar

The pbar! function first clears any existing progress bar, then creates a new ProgressBar with the provided arguments. The transient argument defaults to true, and columns defaults to :default.

Pbar.pbclose!Function

Stops the progress bar after completing the job.

Pbar.pbclose!Function

Terminates the progress bar.

pbclose!()
pbclose!(pb::Term.Progress.ProgressBar)
pbclose!(pb::Term.Progress.ProgressBar, all)

The pbclose! function completes all jobs in the progress bar and then stops the progress bar itself.

Pbar.@pbar!Macro

Instantiate a progress bar:

  • data: length(data) determines the bar total
  • unit: what unit the display
  • desc: description will appear over the progressbar
Pbar.@pbupdate!Macro

Single update to the progressbar with the new value.

Pbar.@withpbar!Macro

Same as @pbar! but with implicit closing.

The first argument should be the collection to iterate over. Optional kw arguments:

  • desc: description