File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed 
Sources/AsyncAlgorithms/Buffer Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,14 @@ public struct AsyncBufferSequencePolicy: Sendable {
7474/// An `AsyncSequence` that buffers elements in regard to a policy.
7575@available ( AsyncAlgorithms 1 . 0 ,  * )  
7676public  struct  AsyncBufferSequence < Base:  AsyncSequence  &  Sendable > :  AsyncSequence  { 
77+   // Internal implementation note:
78+   // This type origianlly had no requirement that the element is actually Sendable. However,
79+   // that is technically an implementation detail hole in the safety of the system, it needs
80+   // to specify that the element is actually Sendable since the draining mechanism passes
81+   // through the isolation that is in nature sending but cannot be marked as such for the
82+   // isolated next method.
83+   // In practice the users of this type are safe from isolation crossing since the Element 
84+   // is as sendable as it is required by the base sequences the buffer is constructed from.
7785  enum  StorageType  { 
7886    case  transparent( Base . AsyncIterator ) 
7987    case  bounded( storage:  BoundedBufferStorage < Base > ) 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments