Put the milk in a pan and bring it just to the boil. Put the egg yolks, sugar, cornstarch and vanilla in a bowl and beat until the egg yolks are loose. It does not have to foam. Pour slowly, bit by bit, the hot milk to the egg mixture while constantly stirring with a whisk or spatula, so the egg yolks do not congeal.
Pour the mixture back into the pan and heat, still stirring, until the mixture begins to thicken. This takes about 1 to 2 minutes. Pour the custard through a sieve into a bowl and immediately cover with plastic wrap, directly on the surface so no sheet can form. Let it cool to room temperature and then in the refrigerator for another 2 to 3 hours.