libtcspc.MergeNUnsorted¶
- final class libtcspc.MergeNUnsorted(inputs)[source]¶
Bases:
NodeMerges N input streams by passing events through in arrival order.
Events arriving on any input are emitted immediately, in the order they arrive, with no sorting and no buffering. Use this when the inputs are not individually sorted, or when ordering does not matter.
- Parameters:
inputs (int or Sequence[str]) – The input ports. An integer
NcreatesNports named"input-0"through"input-(N-1)". A sequence of names creates ports with those exact names. Must specify at least two inputs.
Notes
All inputs must be fed internally (for example by a
RouteorBroadcastthat fans out a single external input); a merge cannot serve as the executable graph’s external input.All inputs must be driven on the same thread (the underlying C++
merge_n_unsortedshares unsynchronized state across its input ports). This is enforced when the graph is compiled: a merge fed from two threads — for example with aBufferon only one branch — is rejected.Events handled:
All event types: passed through in arrival order.
End of input: propagated once all inputs have ended.
See also
- tcspc::merge_n_unsorted()
The underlying C++ factory function.
Merge2-way sorted merge ordered by
abstime.MergeNN-way sorted merge ordered by
abstime.