If you want preemption within a particular package, you can compile it "go
build -gcflags=particular_package=-d=ssa/insert_resched_checks/on" .
That will not fix any problems with underlying raciness, though it may mask
them.
If you want an entire compiler that defaults to that mode and librarie
On Fri, Aug 16, 2019 at 8:09 PM wrote:
> The Go-Scheduler is unable to allow to switch to another goroutine in
> busy-waiting-loops -
> the only possibility to get around that problem is either to put
> "switch-steps" into the source
> - either "time.Sleep(1)" or "runtime.Gosched()".
> I think th
But as was pointed out, in this case it does not matter as the code is sharing
memory without proper synchronization so preemption doesn’t really matter.
> On Aug 16, 2019, at 11:29 PM, Ian Lance Taylor wrote:
>
>> On Fri, Aug 16, 2019 at 9:24 PM wrote:
>>
>> Could you let me know which comp
On Fri, Aug 16, 2019 at 9:24 PM wrote:
>
> Could you let me know which compiler can support pre-emption and how to
> enable it? Thanks.
No current Go toolchain supports preemption in all cases; for the gc
toolchain, that is https://golang.org/issue/10958. But the exact
definition of a busy loop
Could you let me know which compiler can support pre-emption and how to
enable it? Thanks.
On Saturday, August 17, 2019 at 9:20:07 AM UTC+8, Ian Davis wrote:
>
> On Fri, 16 Aug 2019, at 7:09 PM, dr.ch...@gmail.com wrote:
>
> Dear Community and dear Go-developers,
>
> Meanwhile it is clear why th
On Fri, 16 Aug 2019, at 7:09 PM, dr.ch.mau...@gmail.com wrote:
> Dear Community and dear Go-developers,
>
> Meanwhile it is clear why things do not work:
> The Go-Scheduler is unable to allow to switch to another goroutine in
> busy-waiting-loops -
> the only possibility to get around that proble
On Fri, Aug 16, 2019 at 8:09 PM wrote:
> Meanwhile it is clear why things do not work:
> The Go-Scheduler is unable to allow to switch to another goroutine in
> busy-waiting-loops -
> the only possibility to get around that problem is either to put
> "switch-steps" into the source
> - either "t
Your code is incorrect for Go. You need to use correct concurrent code. It is
documented that tight loops that do not involve function calls may not allow GC
to occur.
> On Aug 16, 2019, at 1:09 PM, dr.ch.mau...@gmail.com wrote:
>
> Dear Community and dear Go-developers,
>
> Meanwhile it is c
Dear Community and dear Go-developers,
Meanwhile it is clear why things do not work:
The Go-Scheduler is unable to allow to switch to another goroutine in
busy-waiting-loops -
the only possibility to get around that problem is either to put
"switch-steps" into the source
- either "time.Sleep(1)"