Beat the egg yolks and sugar rapidly to blend well. In a saucepan, dissolve the cornstarch in 1/2 cup of milk. Add the rest of the milk and vanilla, and bring to a boil, stirring constantly. Pour gradually into the egg mixture and blend well. Return to the heat and boil, stirring constantly, 2 minutes. Cool in the refrigerator until needed.
NOTE: Sometimes, in spite of every precaution, the custard separates. When this happens, remove the custard from the heat immediately and place in a bowl of cracked ice. Beat rapidly until smoothness is restored. The custard will be slightly thinner.