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 {
221
221
state : entity_manager:: ActiveEntityState < Self > ,
222
222
cause : entity_manager:: ShutdownCause ,
223
223
) {
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.
227
224
if let Some ( mut handle) = state. state . 0 . lock ( ) . await . take ( ) {
228
225
trace ! ( "shutting down hash: {}, cause: {cause:?}" , state. id) ;
229
226
handle. persist ( & state) ;
Original file line number Diff line number Diff line change @@ -502,6 +502,10 @@ impl BaoFileStorage {
502
502
}
503
503
504
504
/// 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.
505
509
#[ derive( Debug , Clone , derive_more:: Deref ) ]
506
510
pub ( crate ) struct BaoFileHandle ( Arc < watch:: Sender < BaoFileStorage > > ) ;
507
511
You can’t perform that action at this time.
0 commit comments