It's actually more like a figure-eight cycle, though--depending on species. Wasps start out in the syconium full of male flowers, called a caprifig. The male wasps mate with the females immediately after pupation, and fertilize still incomplete female wasps. They dig a tunnel out of the caprifig then die; the female wasps escape via the tunnel, carrying male-flower pollen with them.
Female wasps then enter either caprifigs or figs--male or female syconia. If they enter a male syconium, they get to lay their eggs in the male flowers and the process starts anew. If they enter a female syconium, they can't lay eggs in the female flowers because they're shaped wrong, and die alone--but not before coating the female flowers in the male pollen from their birthplace.
The female syconium, if fertilized by wasps, develops seeds, is eaten, and gives rise to the next generation of fig trees. The syconium secretes digestive enzymes