class Concurrent::WrappingExecutor

A delegating executor which modifies each task with arguments before the task is given to the target executor it delegates to. @example Count task executions

counter          = AtomicFixnum.new
count_executions = WrappingExecutor.new Concurrent.global_io_executor do |*args, &task|
  [*args, -> *args { counter.increment; task.call *args }]
end
10.times { count_executions.post { :do_something } }
sleep 0.01
counter.value #=> 10