Put the eggs and vanilla in the food processor/ mixer bowl and blend. With the motor running add the sugar and cornflour/cornstarch
Heat the milk in a saucepan until it's just coming up to boil and pour into the egg mixture with the machine running all the time. Blend until smooth
To thicken, return the custard to the saucepan and heat gently while stirring - about 2-3 minutes should be enough for pouring custard, 4-5 minutes for a thicker custard, e.g. for trifle.If the custard doesn't thicken, turn up the heat and stir continuously to prevent sticking.
If the custard goes lumpy, return to the food processor for a few seconds or blitz with a stick blender.