it is basically a 'wait loop' but it does have some sleeps in there to
avoid chewing on CPU, in your case the statement wil just do nothing
for 20s and then wait for another 300 w/o doing anything. This path
has no internal sleep in the loop (path and socket do) so that is
probably why the CPU is being killed by a tight loop.
test out this PR and see if it fixes the issue for you
https://github.com/ansible/ansible-modules-core/pull/1422