In a saucepan, bring the milk and vanilla to a simmer. In a bowl large enough to also hold the hot milk, whisk together the sugar, egg, and egg yolks for about 1 minute, or until smooth and pale. Whisk in the cornstarch until smooth. Ladle about half of the hot milk into the egg mixture, while stirring constantly with a whisk. Pour this mixture back into the saucepan, place the saucepan over medium heat, and stir with a whisk until the mixture bubbles and thickens. Place the hot pastry cream in a bowl, cover it with plastic wrap, and let it cool. If you are in a hurry, beat the pastry cream in a stand mixer with a nonreactive paddle attachment until it reaches room temperature.