If traffic ahead of you is blocking an intersection, you should:

Drivers may not enter an intersection unless they can get through it without having to stop. In heavy traffic, wait until the vehicles ahead of you clear an intersection before you proceed so that you are not blocking the intersection when the light for cross traffic turns green.
DMV Writen Test