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

I've looked at the finalizer unittest 
(https://golang.org/src/runtime/mfinal_test.go?h=SetFinalizer) 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 
execute?  

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."

thanks,
peter

-- 
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 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to