Saturday 23 March 2024

Go Create a new thread/Gourtine to run backend process in main.go

  go func()

go func() is a Go statement that starts a new goroutine, which is a lightweight thread of execution. When you execute go func(), it launches a new goroutine to run the function asynchronously.

https://gobyexample.com/goroutines


https://go.dev/tour/concurrency/1


No comments:

Post a Comment