MCPcopy Index your code
hub / github.com/TanStack/db / dispose

Function dispose

packages/db/src/query/effect.ts:245–259  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

243 // The dispose function is referenced by both the returned Effect object
244 // and the onSourceError callback, so we define it first.
245 const dispose = async () => {
246 if (disposed) return
247 disposed = true
248
249 // Abort signal for in-flight handlers
250 abortController.abort()
251
252 // Tear down the pipeline (unsubscribe from sources, etc.)
253 runner.dispose()
254
255 // Wait for any in-flight async handlers to settle
256 if (inFlightHandlers.size > 0) {
257 await Promise.allSettled([...inFlightHandlers])
258 }
259 }
260
261 // Create and start the pipeline
262 const runner = new EffectPipelineRunner<TRow, TKey>({

Callers 6

createInvokeHarnessFunction · 0.85
createHarnessFunction · 0.85
createInvokeHarnessFunction · 0.85
createEffectFunction · 0.85

Calls 1

disposeMethod · 0.45

Tested by 3

createInvokeHarnessFunction · 0.68
createHarnessFunction · 0.68
createInvokeHarnessFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…