On Saturday, October 15, 2016 at 6:37:08 PM UTC+8, Hotei wrote:
> re "meaningfullness" - I think he's saying that a finalizer for a function 
> called in a goroutine might not run if main() quits first, intentionally or 
> otherwise.  You can of course check for this specific case by making sure 
> all your goroutines are cleaned up before exiting main - but in some 
> (many?) cases that's overkill. 
>  If it's REALLY important to know which finalizer actions completed you 
> could log them to disk and analyse the results afterwards to see that all 
> the boxes got checked. Not quite what the OP was looking for I know - but 
> might help diagnose problems.  

Can you enum any use cases of SetFinalizer 
<https://golang.org/src/runtime/mfinal_test.go?h=SetFinalizer>? I mean the 
use cases where alternative solutions would do worse than SetFinalizer 

> On Saturday, October 15, 2016 at 3:08:46 AM UTC-4, di...@veryhaha.com 
> wrote:
>> On Saturday, October 15, 2016 at 8:18:04 AM UTC+8, Ian Lance Taylor wrote:
>>> On Fri, Oct 14, 2016 at 4:08 PM, 'Peter Lam' via golang-nuts 
>>> <golan...@googlegroups.com> wrote: 
>>> > Is there someway to wait for all pending finalizers to be run? 
>>> Not in general, no.  Conceptually it doesn't make sense since, as you 
>>> know, finalizers not guaranteed to run at all.  You could of course 
>>> write your finalizers to support this. 
>>> Ian 
>> if finalizers not guaranteed to run at all, then what is its 
>> meaningfulness? 

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