As one who pushed for multi-parent support in the original pitch and review, I'm excited to see this come back for a second pitch so quickly. Thank you for your efforts.
I think the architecture works here, but the naming confuses me a little bit. Let me see if I understand it correctly:
ProgressManager
represents the overall progress of an operation. It has methods for updating the progress (either directly, or by assigning it to subprogress instances). It is also observable, so that the progress can be observed.
Subprogress
represents a portion of the work belonging to a parent ProgressManager
ProgressReporter
provides a read-only view onto the progress of a manager, and can be incorporated into existing trees. It's well suited for being exposed as a public property on a long-running asynchronous operation and consumed by others.
Am I understanding correctly? I think Subprogress
is well-named. But ProgressManager
and ProgressReporter
don't feel quite right. After all, the proposal itself says:
ProgressManager
is used to report progress.
It's odd that when I want to report progress, I use a ProgressManager
, and not a ProgressReporter
. That confused me as I was reading it; I expected ProgressReporter to be the "star" of the show, not a secondary advanced option.
As proposed, ProgressReporter
is primarily used for reading or observing some progress, without exposing the ability to modify the status of that progress. It's like a read-only view into the primary object. I wonder if we should lean into the "reporting" role of the manager.
Proposal: What if we return ProgressManager
to its original name of ProgressReporter
, and call the read-only view something like ProgressReporter.Status
or ProgressReporter.Report
or ProgressReporter.Observer
? Something that clearly indicates it is reflecting the status of another progress reporter?
Also, an unrelated question about the interoperability between Progress
and ProgressManager
. The proposal says this:
Due to the fact that the existing Progress
assumes a tree structure instead of an acyclic graph structure of the new ProgressManager
, interoperability between Progress
and ProgressManager
similarly assumes the tree structure.
Does this mean that a Progress
cannot participate at all in an acyclic graph? Or does it just mean that it cannot directly have multiple parents? Is it okay if a Progress
has a single ProgressManager
as a parent, but then that progress manager's reporter gets added to multiple trees?
Again, thank you for your work on this!