drainConnection {rethinker} | R Documentation |
Drains a given RethinkDB connection, i.e. pull query responses and both call their associated callbacks (for async queries) and/or filling sync cursor local cache. Draining ends when all async queries end; the function blocks for the entire time this is happening.
drainConnection(x)
x |
Connection to drain. |
The async query callback will only fire during drainConnection
or (opportunistically) cursorNext
; consequently this function must be run to guarantee that installed callbacks will have a chance to fire.