News for hackers. Stuff that matters.
Re:Go 1.14 release notes by jhoechtl on Tuesday February 25, 2020 @03:56PM (#22417352)
> Goroutines are now asynchronously preemptible. As a result, loops without function calls no longer potentially deadlock the scheduler or significantly delay garbage collection.

What does that mean in practice? Can I perform expensive calculations in parallel exhausting all cores?

Re:Go 1.14 release notes by diegobernardes on Tuesday February 25, 2020 @04:13PM (#22417517)
This means that the threads can't be blocked forever. The way Go scheduler work is to check during function calls if the current goroutine has executed for some period of time, after that the scheduler will remove the goroutine from the thread and open space for other goroutines to execute. But if you're doing a loop without function calls, imagine a for {}, in this case, the thread will be locked forever. Now with 1.14, this don't happen anymore. In my opinion the expected result will be better tail latencies.
Re:Go 1.14 release notes by tapirl on Tuesday February 25, 2020 @09:42PM (#22419794)
It means the following program will happily exit now.

  package main
  
  import (
    "time"
    "runtime"
  )
  
  func main(){
    for i := runtime.NumCPU(); i > 0; i-- {
      go func() {
        for {}
      }()
    }
    time.Sleep(time.Second)
    println("bye")
  }
Re:Go 1.14 release notes by pansa2 on Tuesday February 25, 2020 @05:08PM (#22417997)
Go has supported running goroutines in parallel since before 1.0, and it’s been the default behaviour since version 1.5, released in 2015.