On Fri, Aug 16, 2019 at 8:09 PM <dr.ch.mau...@gmail.com> 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 "time.Sleep(1)" or "runtime.Gosched()".
> I think that THIS SHOULD BE DOCUMENTED IN THE LANGUAGE SPECIFICATION !!!!!
>
> (See my book on https://maurer-berlin.eu/nspbuch - in it's 4th edition things 
> are mentioned.)

That conclusion is not correct and you should correct your book. The
code in the OP is racy. You cannot say anything meaningful about the
behavior of a racy Go program - it is undefined.

-- 
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/CAA40n-XQpGu%2BUt4hABbt7Hn%2BNt02s%2B_tbBjEZDrSQmzEV8gW5w%40mail.gmail.com.

Reply via email to