changed atomic counter over

reduces contention between threads, and doesn’t require the executor to
execute stale tasks