Quiz

Quiz yourself on the concepts of deadlock, race condition, livelock, and starvation.

1

(True or False.) The following code will throw a deadlock error:

package main

import "fmt"

func main() {
	messages := make(chan string)

	go func() {
		<-messages                         
		fmt.Println("Receive message")
	}()

	<-messages     
    fmt.Println("Receive message")
}
A)

True

B)

False

Question 1 of 30 attempted

Get hands-on with 1200+ tech skills courses.