- Category: Language-C interface
This class implements a peculiar stream that optimizes the order
in which symbols are searched in dynamically linked libraries.
When using #next, the stream will restart from the first element
after returning nil once. When you use #do:, the stream starts
from the *last* element that was either returned by #next or passed
to #do: in the previous iteration.
Since the #primDefineExternFunc: leaves the #do: in advance if it
succeeds in finding a symbol, the next time it will restart from
the library in which it found a symbol. Usually symbols have a
very good locality (you find all the symbols in a library, or at
least symbols in the same #methodsFor: come from the same library):
so this avoids looking for symbols in the wrong library.
Method category index
test: s get: n
test: s leaveAfter: n
RoundRobinStream testOn: #(1 2 3 4 5 6)
Iterate on all the items in the Stream. If it is not the first iteration,
and the last item was retrieved with #next or passed to a #do: block *that
did a global return*, return from there.