implement channel-based work distribution with generics for type-safe concurrent processing, includes run, runwithfilter, and foreach methods with comprehensive test coverage