@@ -118,6 +118,8 @@ internal struct AnyMetatypeWrapper: Hashable, Equatable, Sendable {
118118        } 
119119    } 
120120
121+     
122+     /// A `ProgressReporter` instance, used for providing read-only observation of progress updates or composing into other `ProgressManager`s.
121123    public  var  reporter :  ProgressReporter  { 
122124        return  . init( manager:  self ) 
123125    } 
@@ -127,6 +129,7 @@ internal struct AnyMetatypeWrapper: Hashable, Equatable, Sendable {
127129
128130        associatedtype  Value :  Sendable ,  Hashable,  Equatable
129131
132+         /// The default value to return when property is not set to a specific value.
130133        static  var  defaultValue :  Value  {  get  } 
131134    } 
132135
@@ -252,6 +255,9 @@ internal struct AnyMetatypeWrapper: Hashable, Equatable, Sendable {
252255
253256    /// Returns a `Subprogress` representing a portion of `self` which can be passed to any method that reports progress.
254257    ///
258+     /// If the `Subprogress` is not converted into a `ProgressManager` (for example, due to an error or early return),
259+     /// then the assigned count is marked as completed in the parent `ProgressManager`.
260+     ///
255261    /// - Parameter count: Units, which is a portion of `totalCount`delegated to an instance of `Subprogress`.
256262    /// - Returns: A `Subprogress` instance.
257263    public  func  subprogress( assigningCount portionOfParent:  Int )  ->  Subprogress  { 
@@ -264,16 +270,16 @@ internal struct AnyMetatypeWrapper: Hashable, Equatable, Sendable {
264270    /// Adds a `ProgressReporter` as a child, with its progress representing a portion of `self`'s progress.
265271    /// - Parameters:
266272    ///   - reporter: A `ProgressReporter` instance.
267-     ///   - portionOfParent : Units, which is a portion of `totalCount`delegated to an instance of `Subprogress`.
268-     public  func  assign( count portionOfParent :  Int ,  to reporter:  ProgressReporter )  { 
273+     ///   - count : Units, which is a portion of `totalCount`delegated to an instance of `Subprogress`.
274+     public  func  assign( count:  Int ,  to reporter:  ProgressReporter )  { 
269275        precondition ( isCycle ( reporter:  reporter)  ==  false ,  " Creating a cycle is not allowed. " ) 
270276
271277        // get the actual progress from within the reporter, then add as children
272278        let  actualManager  =  reporter. manager
273279
274280        // Add reporter as child + Add self as parent
275281        self . addToChildren ( childManager:  actualManager) 
276-         actualManager. addParent ( parentReporter:  self ,  portionOfParent:  portionOfParent ) 
282+         actualManager. addParent ( parentReporter:  self ,  portionOfParent:  count ) 
277283    } 
278284
279285    /// Increases `completedCount` by `count`.
0 commit comments