create goroutine before writing to channel without buffer