Limit concurrency with simpler logic suggested by @dlecocq.