File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -287,6 +287,18 @@ class Executor
287287 * Adding subscriptions, timers, services, etc. with blocking or long running
288288 * callbacks may cause the function exceed the max_duration significantly.
289289 *
290+ * Work that is ready to be done is collected only once, and when collecting that work
291+ * entities which may have multiple pieces of work ready will only be executed at most
292+ * one time.
293+ * The reason for this is that it is not possible to tell if, for example, a ready
294+ * subscription has only one message ready or multiple without checking again.
295+ * Because, in order to find out if there are multiple messages, one message must
296+ * be taken and executed before checking again if that subscription is still ready.
297+ * However, this function only checks for ready entities to work on once,
298+ * and so it will never execute a single entity more than once per call to this function.
299+ * See spin_all() variants for a function that will repeatedly work on a single entity
300+ * in a single call.
301+ *
290302 * If there is no work to be done when this called, it will return immediately
291303 * because the collecting of available work is non-blocking.
292304 * Before each piece of ready work is executed this function checks if the
You can’t perform that action at this time.
0 commit comments