You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Thus, [`spawn`] is disallowed, and instead use [`SpawnedTask`].
262
262
///
263
263
/// To enable timely cancellation, the [`Stream`] that is returned must not
264
-
/// block the CPU and must yield back to the tokio runtime regularly.
265
-
/// [`ExecutionPlan`] implementations should follow [the guideline of not
266
-
/// spending a long time without reaching an `await`/yield point][async-guideline].
267
-
/// This can be achieved by manually returning [`Poll::Pending`] in regular
268
-
/// intervals, or the use of [`tokio::task::yield_now()`] (as appropriate).
269
-
/// Determination for "regularly" may be made using a timer (being careful
270
-
/// with the overhead-heavy syscall needed to take the time) or by
271
-
/// counting rows or batches.
264
+
/// block the CPU indefinitely and must yield back to the tokio runtime regularly.
265
+
/// In a typical [`ExecutionPlan`], this automatically happens unless there are
266
+
/// special circumstances; e.g. when the computational complexity of processing a
267
+
/// batch is superlinear. See this [general guideline][async-guideline] for more context
268
+
/// on this point, which explains why one should avoid spending a long time without
269
+
/// reaching an `await`/yield point in asynchronous runtimes.
270
+
/// This can be achieved by manually returning [`Poll::Pending`] and setting up wakers appropriately, or the use of [`tokio::task::yield_now()`] when appropriate.
271
+
/// In special cases that warrant manual yielding, determination for "regularly" may be
272
+
/// made using a timer (being careful with the overhead-heavy system call needed to
273
+
/// take the time), or by counting rows or batches.
272
274
///
273
275
/// The cancellation benchmark tracks some cases of how quickly queries can
0 commit comments