impl Sync for DataBlobReader
this is safe for the reason explained in the comment Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
		
				
					committed by
					
						 Dietmar Maurer
						Dietmar Maurer
					
				
			
			
				
	
			
			
			
						parent
						
							4a3adc3de8
						
					
				
				
					commit
					eeaa2c212b
				
			| @ -19,6 +19,10 @@ pub struct DataBlobReader<R: Read> { | ||||
|     state: BlobReaderState<R>, | ||||
| } | ||||
|  | ||||
| // zstd_safe::DCtx is not sync but we are, since | ||||
| // the only public interface is on mutable reference | ||||
| unsafe impl<R: Read> Sync for DataBlobReader<R> {} | ||||
|  | ||||
| impl <R: Read> DataBlobReader<R> { | ||||
|  | ||||
|     pub fn new(mut reader: R, config: Option<Arc<CryptConfig>>) -> Result<Self, Error> { | ||||
|  | ||||
		Reference in New Issue
	
	Block a user