mcp-go icon indicating copy to clipboard operation
mcp-go copied to clipboard

Consultation

Open dugenkui03 opened this issue 7 months ago • 1 comments

What is the use of the line close(ready)?

https://github.com/mark3labs/mcp-go/blob/9f39a43b4e9d756e386289dd687f57cf9ffacfe0/client/transport/stdio.go#L93

Image

dugenkui03 avatar Apr 21 '25 11:04 dugenkui03

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.

ezynda3 avatar Apr 21 '25 12:04 ezynda3