Used process::loop to avoid stack overflow due to recursion.
Used process::loop to avoid stack overflow due to recursion.

Review: https://reviews.apache.org/r/54840

abudnik/mesos,craimbert/mesos,verizonlabs/mesos,verizonlabs/mesos,verizonlabs/mesos,craimbert/mesos,kaysoky/mesos,yuquanshan/customizedMesos,verizonlabs/mesos,reneploetz/mesos,kaysoky/mesos,Aman-Jain-14/customizedMesos,zmalik/mesos,zmalik/mesos,dforsyth/mesos,abudnik/mesos,andschwa/mesos,asamerh4/mesos,jpeach/mesos,verizonlabs/mesos,gsantovena/mesos,dforsyth/mesos,Gilbert88/mesos,reneploetz/mesos,yuquanshan/customizedMesos,jpeach/mesos,craimbert/mesos,asamerh4/mesos,neilconway/mesos,chhsia0/mesos,asamerh4/mesos,asamerh4/mesos,reneploetz/mesos,andschwa/mesos,neilconway/mesos,chhsia0/mesos,abudnik/mesos,Aman-Jain-14/customizedMesos,zmalik/mesos,jpeach/mesos,kaysoky/mesos,Gilbert88/mesos,neilconway/mesos,zmalik/mesos,yuquanshan/customizedMesos,Aman-Jain-14/customizedMesos,Gilbert88/mesos,neilconway/mesos,yuquanshan/customizedMesos,reneploetz/mesos,chhsia0/mesos,Aman-Jain-14/customizedMesos,yuquanshan/customizedMesos,verizonlabs/mesos,chhsia0/mesos,andschwa/mesos,dforsyth/mesos,Gilbert88/mesos,zmalik/mesos,neilconway/mesos,andschwa/mesos,Aman-Jain-14/customizedMesos,asamerh4/mesos,gsantovena/mesos,abudnik/mesos,jpeach/mesos,reneploetz/mesos,neilconway/mesos,kaysoky/mesos,andschwa/mesos,dforsyth/mesos,gsantovena/mesos,jpeach/mesos,yuquanshan/customizedMesos,craimbert/mesos,gsantovena/mesos,Gilbert88/mesos,gsantovena/mesos,abudnik/mesos,craimbert/mesos,kaysoky/mesos,dforsyth/mesos,yuquanshan/customizedMesos,verizonlabs/mesos,kaysoky/mesos,craimbert/mesos,reneploetz/mesos,kaysoky/mesos,chhsia0/mesos,Gilbert88/mesos,zmalik/mesos,andschwa/mesos,dforsyth/mesos,abudnik/mesos,zmalik/mesos,jpeach/mesos,jpeach/mesos,asamerh4/mesos,abudnik/mesos,chhsia0/mesos,dforsyth/mesos,gsantovena/mesos,Gilbert88/mesos,neilconway/mesos,Aman-Jain-14/customizedMesos,asamerh4/mesos,craimbert/mesos,gsantovena/mesos,andschwa/mesos,chhsia0/mesos,Aman-Jain-14/customizedMesos,reneploetz/mesos