On Sat, Oct 15, 2016 at 12:08 AM, 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
>> wrote:
>> > Is there someway to wait for all pending
In that case it's generally "better" to have an explicit Close on your Go type
which causes the explicit freeing of C memory. This can be tedious depending on
your specific code, though.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To
On Sun, 16 Oct 2016, 6:16 PM wrote:
>
>
> 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.
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
You shouldn't rely on finalisers for the correctness of your program, which is
another way of saying, you shouldn't rely on finalisers. Period.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving
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
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
> wrote:
> > Is there someway to wait for all pending finalizers to be run?
>
> Not in general, no. Conceptually it doesn't
On Fri, Oct 14, 2016 at 4:08 PM, 'Peter Lam' via golang-nuts
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
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