On Fri, Sep 28, 2018 at 7:08 AM, changkun <euryugas...@gmail.com> wrote: > > 1. Is my suspicion reasonable and correct?
I wouldn't be my first guess. You say that pango memory is per-thread. That suggests that you need to always call pango on a consistent thread. That will not happen by default. You likely need to arrange to make all your pango calls from a single goroutine, and have that goroutine first call runtime.LockOSThread. > 2. Why an error when involving cgo? My first guess would be that it is because you are calling the cgo code from different threads. > 3. Are memories in a non-Go thread completely isolated to Go > memory per-non-Go thread? Sorry, I don't understand this question. > 4. Are C memories allocated in a cgo call always stands in > the same sharing heap even threading? If I understand you correctly, then, yes. Ian -- 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.