This avoids allocations for initializing the Function<T> for the NetworkAdapter::for_each callback argument. Applying this patch decreases CPU utilization for NetworkTask from 40% to 28% when receiving TCP packets at a rate of 100Mbit/s.