use AsyncResult.wait(...) to consume less cpu resources while waiting for child processes