File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -221,9 +221,6 @@ impl entity_manager::Params for EmParams {
221221 state : entity_manager:: ActiveEntityState < Self > ,
222222 cause : entity_manager:: ShutdownCause ,
223223 ) {
224- // this isn't strictly necessary. Drop will run anyway as soon as the
225- // state is reset to it's default value. Doing it here means that we
226- // have exact control over where it happens.
227224 if let Some ( mut handle) = state. state . 0 . lock ( ) . await . take ( ) {
228225 trace ! ( "shutting down hash: {}, cause: {cause:?}" , state. id) ;
229226 handle. persist ( & state) ;
Original file line number Diff line number Diff line change @@ -502,6 +502,10 @@ impl BaoFileStorage {
502502}
503503
504504/// A cheaply cloneable handle to a bao file, including the hash and the configuration.
505+ ///
506+ /// You must call [Self::persist] to write the bitfield to disk, if you want to persist
507+ /// the file handle, otherwise the bitfield will not be written to disk and will have
508+ /// to be reconstructed on next use.
505509#[ derive( Debug , Clone , derive_more:: Deref ) ]
506510pub ( crate ) struct BaoFileHandle ( Arc < watch:: Sender < BaoFileStorage > > ) ;
507511
You can’t perform that action at this time.
0 commit comments