An implementation of counting Semaphores that
enforces enough fairness for applications that
need to avoid indefinite overtaking without
necessarily requiring FIFO ordered access.
Conveniently computes a stable subsequence of elements from a given input sequence;
Picks (samples) exactly one random element from successive blocks of weight input elements each.