How to stop a goroutine that is listening for RethinkDB changefeeds?
问题 I am trying to figure out how to use RethinkDB changefeeds with golang. My specific question is how to stop a goroutine that listens for changes to the database. See, for example, the function getData() below. I run this from a handler function by calling go getData(c) . Whenever the database updates, the record is passed to the channel c , which is then passed to the handler function and sent to the client using SSE technology. My question is: when the client disconnects, I know how to stop