Implemented helper function post_and_wait
Finished implementing post_and_wait. It is now used in the examples where possible.