On Fri, Nov 7, 2014 at 5:37 PM, wrote:
1) when GOMAXPROCS is unset, or set to 1, we can have two OS threads running
in parrallel (main thread + finalizer thread) ?
You can't have two Go threads running in parallel, but you can have a
finalizer Go thread running in parallel with a C thread.

2) the GC never interrupts a cgo call that is executing ? When there are
many threads, GC waits for the threads to come at a rendez-vous point before
running ?
GC can run during a long-running cgo call.

3) if the resource allocator is not thread-safe, how use it in a finalizer ?
Have the finalizer adds objects to a queue, and have a goroutine that
free items on the queue holding appropriate locks.


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

Search Discussions

Discussion Posts


Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 4 of 6 | next ›
Discussion Overview
groupgolang-nuts @
postedNov 8, '14 at 1:37a
activeNov 11, '14 at 4:09a



site design / logo © 2021 Grokbase