On Wed, Sep 2, 2020 at 7:14 PM Yonatan Gizachew <emeg...@gmail.com> wrote:

> Is it possible to stop the asynchronous preemption like:
> GODEBUG=asyncpreemptoff=1 go build -o libgotest.so -buildmode=c-shared
> -compiler=gccgo test.go
>
> I am using gccgo compiler.
>

Yes, although that will only disable async preemption for the "go build"
tool chain. It will not disable it in the binary that is the result. So,
no, it won't do what I think you're requesting. The reason this is
controlled via the "GODEBUG" env var is because it is meant for debugging.
It is not expected that a Go program will need to disable async preemption
100% of the time. If you have a situation that does need to always disable
it you should probably open a bug report.

-- 
Kurtis Rader
Caretaker of the exceptional canines Junior and Hank

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CABx2%3DD_smukEHqRWA95OnrtPNFiRHwJZJvCbcCjXx4RLUQ2sxg%40mail.gmail.com.

Reply via email to