Whisk the egg yolks thoroughly in a medium bowl. They should become uniform, with no separate streaks of yolk.
Whisk the milk into the yolks gradually. The mixture should look evenly blended before it reaches the saucepan.
Combine the sugar, cornstarch, and salt in a large, heavy saucepan over medium-low heat. Break up visible starch clumps so they don’t remain dry when liquid is added.
Stir the milk-and-yolk mixture into the saucepan in a gradual stream. Keep the mixture moving so the cornstarch disperses without forming lumps.
Stir constantly over medium-low heat for about 20 minutes, removing the pan from the burner when the filling thickens and reaches a gentle boil. Large, slow bubbles should break through the thickened surface, and the filling will firm further as it cools.
Set the saucepan in a large bowl of ice water, continue stirring, and blend in the vanilla. The filling should cool evenly instead of staying hot around the edges of the pan.
Press plastic wrap against the filling’s surface and refrigerate until needed for assembly. Direct contact keeps a tough skin from forming as the pastry cream chills.