mcp-go
mcp-go copied to clipboard
Consultation
What is the use of the line close(ready)?
https://github.com/mark3labs/mcp-go/blob/9f39a43b4e9d756e386289dd687f57cf9ffacfe0/client/transport/stdio.go#L93
This makes sure the goroutine is actually running before reaching the end of the Start() function. Otherwise there could be a race condition where the end of the function is reached before the goroutine has even started.