Home

thingswhile

Thingswhile is a term used in software development to describe an idiom for processing a stream of items, referred to as things, while a condition remains true. In practice, it combines a loop control structure with streaming or event-driven processing, allowing a system to continue handling inputs as long as it has work to do or until a stop signal is received. The phrase is informal and not tied to a single programming language or formal specification.

Origin and usage: The term emerged in online discussions, blogs, and code samples among developers working with

Concepts and patterns: Thingswhile emphasizes continuous processing, backpressure awareness, and resource management. Common implementations use a

Example (pseudo-code): while more_things(source): t = next_thing(source); if should_stop(t): break; process(t).

Variants and related terms: The idea overlaps with streaming, data pipelines, event-driven programming, and the concept

See also: streaming, generators, reactive programming, while loop, backpressure.

data
pipelines,
sensors,
and
asynchronous
workflows
in
the
2010s.
It
expresses
the
idea
of
driving
work
by
ongoing
availability
of
"things"
rather
than
by
static
batch
boundaries.
while
loop
that
pulls
the
next
item
from
a
source
(queue,
stream,
generator)
and
processes
it,
stopping
when
the
source
is
exhausted
or
a
termination
condition
is
met.
In
modern
frameworks,
similar
behavior
appears
in
reactive
streams,
asynchronous
iterators,
or
generator-based
pipelines.
of
a
generator
or
consumer
loop.
It
is
sometimes
conflated
with
any
loop
that
processes
items
indefinitely
until
a
condition
breaks
it.