How to pause the code until animation finished

I want to play 3 actions. But it should play one after one. When i used the below code, it can only play one action only.
main_arm.playAction(action, start, end, layer, priority, blendin, mode, layerWeight, ipoFlags, speed)
if i use above code 3 time to play 3 actions then it played only one action, then i tried to change start and end time according action to play one after one. But it also not working. Is there is a way to pause the code until the animation finish or play 3 actions one after one?