Is there someway to wait for all pending finalizers to be run?

I've looked at the finalizer unittest 
( and it looks 
like it just waits 4 seconds.  Is that best-practice?

Is there some deterministic way to wait for all pending finalizers to 

I understand that:
"There is no guarantee that finalizers will run before a program exits, so 
typically they are useful only for releasing non-memory resources 
associated with an object during a long-running program."


You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
For more options, visit

Reply via email to