Refactor wait_for_complete to allow async waiting.
Refactor wait_for_complete to allow async waiting.

bgyori/indra,johnbachman/belpy,bgyori/indra,johnbachman/belpy,johnbachman/indra,sorgerlab/belpy,sorgerlab/indra,sorgerlab/belpy,sorgerlab/belpy,bgyori/indra,johnbachman/indra,sorgerlab/indra,johnbachman/belpy,sorgerlab/indra,johnbachman/indra