haskell-rethinkdb icon indicating copy to clipboard operation
haskell-rethinkdb copied to clipboard

Closing cursor with changes feed

Open Wildsoft opened this issue 8 years ago • 2 comments

No sure if it is really an issue , just wanted to confirm what is the right way to release Cursor obtained to receive change feeds (changes). There is no close method on Cursor (https://www.rethinkdb.com/api/javascript/close-cursor/) so for now I just spawn thread in which I invoke each function. When I no longer need changesfeed I cancel the thread. My concern is that it would cause resource leak if cursor is not released correctly at that point. Thanks.

Wildsoft avatar Aug 21 '17 01:08 Wildsoft

@Wildsoft Are you looking for this close?

codedmart avatar Aug 21 '17 20:08 codedmart

@codedmart No, I was not looking to close connection. I wanted to close cursor and release associated resources. Like: https://www.rethinkdb.com/api/javascript/close-cursor/

Wildsoft avatar Aug 21 '17 21:08 Wildsoft