The gym is a public place where people are expected to act like they were taught in elementary school. We share. We take turns. We consider those around us.
I like the fact that the people holding up your workout are able to talk and workout together. There is nothing wrong, however, with letting them know you are ready to use that particular machine.
A simple smile and an, "I'm sorry to interrupt but this machine is next on my weight lifting regime." Let's them know that they need to either step it up or talk somewhere else and then workout.