|
|
|
|
|
by simpleglider
4726 days ago
|
|
Small bug irrelevant to the main point of the article:
The very last golang example has a leak. If the timeout does occur, main will exit after a timeout and the spawned go routine will hang on the channel push. I think the easiest fix is to make the channel buffered.
"make(chan string)" => "make(chan string, 1)"
Not sure if there is a more idiomatic golang way to accomplish this. |
|