Function shredder::synchronize_destructors [−][src]
pub fn synchronize_destructors()
Expand description
Block the current thread until the background thread has finished running the destructors for all data that was marked as garbage at the point this method was called.
This method is most useful for testing, as well as cleaning up at the termination of your program.
Example
use shredder::{collect, synchronize_destructors}; // Create some data // <SNIP> // Gc happens collect(); // We cleanup synchronize_destructors(); // At this point all destructors for garbage will have been run