wait till threads finish (busy loop)