func (s *Server) start() {
s.Lock()
defer s.Unlock()
if !s.isClosed{
go s.processing()
}
go s.start()
}
func (s *Server) processing() {
s.Lock()
// do stuff
s.Unlock()
}
I have a working Golang project that has a block of code following the logic shown above.
I don't understand why this logic works as I would've expected a deadlock.