Wait for thread to complete when stopping stream
Wait for thread to complete when stopping stream

Change-Id: I19eac2b83fc0fd6771c703de087b94de372f45af

sonyxperiadev/pygerrit,morucci/pygerrit,benjiii/pygerrit,gferon/pygerrit2,dpursehouse/pygerrit2,dpursehouse/pygerrit,markon/pygerrit2