Pbar
Pbar.Pbar — ModuleProgress bar wrapper.
Pbar.last_render — ConstantStores the timestamp of the last render in the progress bar.
Pbar.min_delta — ConstantStores the minimum time difference required between two render updates.
Pbar.pbar — ConstantHolds a reference to the current progress bar or nothing if no progress bar is active.
Pbar.pbar_lock — ConstantHolds a lock to avoid flickering when updating the progress bar.
Pbar.pbj — ConstantThe current job being rendered.
Pbar.plu — ConstantThe last update timestamp.
Pbar.RunningJob — TypeRepresents a job that is currently running in the progress bar.
jobcounterupdated_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.clearpbar — FunctionClears 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.complete! — FunctionComplete a job.
Pbar.dorender — FunctionRenders the progress bar if enough time has passed since the last render.
Pbar.frequency! — MethodSet the update frequency globally.
Pbar.pbar! — MethodInitializes 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! — FunctionStops the progress bar after completing the job.
Pbar.pbclose! — FunctionTerminates 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.startjob! — FunctionStarts a new job in the progress bar.
Pbar.transient! — FunctionToggles pbar transient flag
Pbar.@pbar! — MacroInstantiate a progress bar:
data:length(data)determines the bar totalunit: what unit the displaydesc: description will appear over the progressbar
Pbar.@pbclose! — MacroCalls pbclose! on the global progress bar.
Pbar.@pbinit! — MacroInitializes the progress bar.
Pbar.@pbstop! — MacroStops the progress bar.
Pbar.@pbupdate! — MacroSingle update to the progressbar with the new value.
Pbar.@withpbar! — MacroSame as @pbar! but with implicit closing.
The first argument should be the collection to iterate over. Optional kw arguments:
desc: description